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

model.generate_topology() -- generate MODEL topology

aln = <alignment>   Alignment between model and templates
io = <io_data>   Options for reading atom files
add_segment = <bool:1> False whether to add the new segments to the list of segments
patch_default = <bool:1> True whether to do default NTER and CTER patching
sequence = <str:1> 'undefined' protein code in the alignment whose topology is constructed

Requirements:
topology and parameter libraries

Description:
This command calculates MODEL's covalent topology (i.e., atomic connectivity) and internal coordinates, and assigns CHARMM atom types, MODELLER atom types for non-bonded spline restraints, atomic charges, and atomic radii.

The sequence of the model to generate is taken from the sequence with code sequence in the alignment aln.

The new sequence is added to the list of segments of the MODEL if add_segment is True, otherwise this list is initiated.

A sequence in the alignment can use any non-patching residue listed in the single-character code column of the $RESTYP_LIB library ('modlib/restyp.lib'). Examples of non-standard residue types include water ('w'), zinc ('z'), calcium ('3'), heme ('h'), and many others. Patching residues must not be used here, but with the subsequent model.patch() commands. Unrecognized residues are ignored. A special allowed residue type is the chain break `/'. This can be used to construct a protein that consists of several chains separated by chain breaks. Chain breaks before a non-standard residue type (there are 23 standard residue types, including '-', 'Asx' and 'Glx') are inserted automatically and do not have to be specified explicitly in the sequence.

The model.generate_topology() command generates only the topology of the MODEL, not its Cartesian coordinates; the Cartesian coordinates are assigned by the model.build(), model.transfer_xyz(), or model.read() commands.

In general, the model.generate_topology() command has to be executed before any energy commands (model.energy(), model.optimize(), model.pick_hot_atoms()). The reason is that reading the Cartesian coordinates by the model.read() command does not generate all the data usually needed for energy evaluation. However, if the order and number of atoms in the input file correspond exactly to the order and number of atoms implied by the restraint atom indices and if you are not using dynamic restraints that rely on non-existing data, such as bond, angle, and dihedral angle lists, atomic charges, radii, Lennard-Jones parameters, MODELLER atom types, or CHARMM atom types (which are used to determine the atomic radii), it is sufficient to do only model.read() and omit model.generate_topology() before the energy commands. In short, if you use static restraints alone and if the atom file has the atoms in the correct order, you do not have to call model.generate_topology() before calculating energy.

The variables alignment[x].atom_file, io and topology.submodel are necessary only when the 'BLOCK' residues are present in the sequence whose topology is generated. In that case, the template PDB files are read in.

Example: See model.patch() command.


next up previous contents index
Next: model.patch() patch Up: The model class: handling Previous: model.write() write   Contents   Index
Ben Webb 2006-02-28