Building a complete universe from a PDB fileΒΆ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# This example shows how a universe can be built from a PDB file in such
# a way that all objects in the PDB file are represented as well as
# possible, using AtomCluster objects when nothing more specific can
# be constructed.
#
# This procedure is the only way to construct a universe that uses the
# same internal atom order as the PDB file, which is important for
# data exchange with other programs.

from MMTK import *
from MMTK.PDB import PDBConfiguration

configuration = PDBConfiguration('some_file.pdb')
universe = InfiniteUniverse()
universe.addObject(configuration.createAll(None, 1))

This Page