Model.generate_topology() — generate MODEL topology

generate_topology(alnseq, patch_default=None, blank_single_chain=False, io=None)
This command calculates the 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 residue sequence to generate is taken from the alignment sequence given by alnseq.

The sequence is added to the model as a new chain; if you want to first remove any existing chains, call Model.clear_topology() prior to this command.

A sequence in the alignment can use any 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. If you wish to use patch residues, use Model.patch() subsequently. You can generate multiple chains by including chain break characters ‘/’ in the alignment. A chain break prevents MODELLER from connecting two otherwise adjacent residues.

By default, the chains are labeled 'A', 'B', 'C' and so on. However, if only one chain is generated, and blank_single_chain is set True, it is given a blank chain ID. Residues in each chain are numbered sequentially, starting at 1. If you want to use the chain IDs and residue numbers from an existing PDB file, use Model.res_num_from().

If patch_default is True, each chain in the sequence is patched with the 'NTER' and 'CTER' patches (see Model.patch()). These patches are applied to the first and last residue respectively in a connected chain of residues (generally this excludes residues that are not in the amino acid chain, such as HETATM residues).

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 (Selection.energy(), Selection.hot_atoms()) or optimizations (Section 6.11).

The variables Sequence.atom_file, io and Topology.submodel are necessary only when residues lacking topology information (e.g., 'BLK' residues) are present in the sequence. In that case, the template PDB files are read in.

Example: See Model.patch() command.