residue_ids = <str:0> | '' | identifiers of the patched residues |
residue_type = <str:1> | 'undefined' | patching residue type |
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.
residue_ids are residue identifiers of the patched residues (Section 3.9.1). 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 for: model.patch(), topology(), parameters.read() # This will define a CYS-CYS disulfide bond between residues 3 and 22. env = environ() env.libs.topology.read(file='$(LIB)/top_heav.lib') env.libs.parameters.read(file='$(LIB)/par.lib') # Read the sequence: code = '1fas' mdl = model(env, file=code) # have two copies of the sequence in the alignment, for TRANSFER_XYZ later: aln = alignment(env) aln.append_model(mdl, atom_files=code, align_codes=code) aln.append_model(mdl, atom_files=code+'.ini', align_codes=code+'-ini') mdl.generate_topology(aln, sequence=code+'-ini') # Create the disulfide bond: mdl.patch(residue_type='DISU', residue_ids=('3', '22')) # Get MODEL's coordinates from the template, using the alignment (1:1 here): mdl.transfer_xyz(aln) # Calculate missing coordinates using internal coordinates: mdl.build(initialize_xyz=False, build_method='INTERNAL_COORDINATES') # Create the stereochemical restraints mdl.restraints.make(aln, restraint_type='stereo', spline_on_site=False) # Calculate the energy to test the disulfide: mdl.energy()