If a protein with code SEQUENCE is found in the current alignment (codes of proteins in the current alignment are stored in ALIGN_CODES), this protein's topology is calculated. If no SEQUENCE entry exists or if the alignment does not exist, the sequence of the MODEL is used. If the MODEL does not exist, an error is reported. The MODEL can be read in from an atomic coordinates file with the READ_MODEL command.
The new sequence is added to the list of segments of the MODEL if ADD_SEGMENT is on, 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 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 GENERATE_TOPOLOGY command generates only the topology of the MODEL, not its Cartesian coordinates; the Cartesian coordinates are assigned by the BUILD_MODEL, TRANSFER_XYZ, or READ_MODEL commands.
In general, the GENERATE_TOPOLOGY command has to be executed before any energy commands (ENERGY, OPTIMIZE, PICK_HOT_ATOMS). The reason is that reading the Cartesian coordinates by the READ_MODEL 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 READ_MODEL and omit 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 GENERATE_TOPOLOGY before calculating energy.
The variables ATOM_FILES, ATOM_FILES_DIRECTORY, WATER_IO, HETATM_IO, HYDROGEN_IO, and TOPOLOGY_MODEL 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.