next up previous contents index
Next: Topology.submodel select Up: The Libraries class: stereochemical Previous: Parameters.read() read   Contents   Index

Topology.make() -- make a subset topology library

make(submodel)

This command makes a residue topology library from the most detailed CHARMM topology library, which contains all atoms, including all hydrogens (corresponding to Topology.submodel = 1). There are currently ten residue topologies, all of which are defined in library $MODELS_LIB, which is also read in by this function. For example, the default non-hydrogen atom topology is selected by submodel = 3. For each submodel and residue type, the $MODELS_LIB library lists those atoms in the full atom set that are part of the specified topology.

This command works by deleting all the entries that contain non-existing atoms from the original topology file. The charge of each removed atom is redistributed equally between the atoms directly bonded to it (if any of these atoms is in turn marked for deletion, the charge is instead placed on that atom's bonded neighbors, and so on). Any remaining charge is then spread around the entire residue, in proportion to the absolute charge of each atom.

One must carefully test topology files produced in this way. Library $RADII_LIB must specify atomic radii for each atom in each residue type for each topology model. submodel must be an integer from 1 to 10. On exit from this routine, Topology.submodel is set to submodel.

For more information about the topology library, see the FAQ Section 3.1, Questions 8 and 9.

Example: examples/commands/make_topology_model.py


# Example for: topology.make(), topology.write()

# This creates a topology library for heavy atoms from the
# CHARMM all-atom topology library:

from modeller import *

env = environ()

tpl = env.libs.topology
# Read CHARMM all-atom topology library:
tpl.read(file='${LIB}/top.lib')

# Keep only heavy atoms (TOPOLOGY_MODEL = 3)
tpl.make(submodel=3)

# Write the resulting topology library to a new file:
tpl.write(file='top_heav.lib')


next up previous contents index
Next: Topology.submodel select Up: The Libraries class: stereochemical Previous: Parameters.read() read   Contents   Index
Automatic builds 2012-08-29