File: construct_from_pdb.py

package info (click to toggle)
mmtk 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,788 kB
  • ctags: 6,600
  • sloc: python: 18,050; ansic: 12,400; makefile: 129; csh: 3
file content (15 lines) | stat: -rw-r--r-- 597 bytes parent folder | download
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))