next up previous contents index
Next: model.patch_ss_templates() guess Up: The model class: handling Previous: model.write_psf() write   Contents   Index

model.patch() -- patch MODEL topology

patch(residue_type, residues)
This command uses a CHARMM patching residue to patch the topology of the MODEL. CHARMM patch rules are observed.

residue_type is the type of the patching residue (PRES entry in the topology library), such as 'DISU', 'NTER', 'CTER', etc. You do not have to apply explicitly the N- and C-terminal patches to protein chains because the 'NTER' and 'CTER' patches are applied automatically to the appropriate residue types at the termini of each chain at the end of each model.generate_topology() command.

residues should be one or more Residue objects to be patched. The first residue is the patched residue 1, the second residue is the patched residue 2, etc; for example, the 'DISU' patching residue has two patched Cys residues while the 'ACE' patching residue has only one patched residue. The order of the residue identifiers here has to match the definition of the patching residue in the topology library.

It is not allowed to patch an already patched residue. Since the N- and C-terminal residues of each chain are automatically patched with the 'NTER' and 'CTER' patching residues, respectively, a user who wants to patch the N- or C-terminal residues with other patches, should turn the default patching off before executing model.generate_topology(). This is achieved by setting patch_default = False.

Example: examples/commands/patch.py


# Example for: model.patch(), topology(), parameters.read()

# This will define a CYS-CYS disulfide bond between residues 3 and 22.

from modeller import *
from modeller.scripts import complete_pdb

env = environ()
env.io.atom_files_directory = ['../atom_files']
env.libs.topology.read(file='$(LIB)/top_heav.lib')
env.libs.parameters.read(file='$(LIB)/par.lib')

# Create the disulfide bond:
def patches(mdl):
    mdl.patch(residue_type='DISU', residues=(mdl.residues['3:'],
                                             mdl.residues['22:']))
# Read the sequence:
code = '1fas'
mdl = complete_pdb(env, code, special_patches=patches)

# Create the stereochemical restraints
sel = selection(mdl)
mdl.restraints.make(sel, restraint_type='stereo', spline_on_site=False)

# Calculate the energy to test the disulfide:
sel.energy()


next up previous contents index
Next: model.patch_ss_templates() guess Up: The model class: handling Previous: model.write_psf() write   Contents   Index
Automatic builds 2014-02-11