This command writes the current MODEL to a file in the selected format.
file can be a filename or a writeable file handle (see modfile.File()).
If you want to only write out a subset of the atoms, see Selection.write().
Setting model_format to 'PDB' writes out files in the Protein Data Bank (PDB) format. Note that the isotropic temperature factor (Biso) field can be set by Selection.energy() or Model.write_data().
'MMCIF' writes out files in the new PDBx or Macromolecular Crystallographic Information File (mmCIF) format.
Note that if the model contains 100,000 or more atoms, residues numbered 10,000 or higher, or chain names longer than a single character, it cannot be represented in traditional PDB format (as the atom serial number is a fixed 5 digits, the residue number 4 digits, and the chain ID a single character). MODELLER will work around this by using hybrid-36 notation, which is understood by many PDB readers. (Note that this is always done for large systems, regardless of the setting of IOData.hybrid36 and IOData.two_char_chain.) In general, however, mmCIF output is recommended for large systems.
The 'GRASP' format is the same as the 'PDB' format, except that it includes two special lines at the top of the file and the atomic radii and charges in the columns following the Cartesian coordinates of atoms. This format is useful for input to program GRASP, written by Anthony Nicholls in the group of Barry Honig at Columbia University [Nicholls et al., 1991]. For GRASP output, the atomic radii are needed. This usually means using the complete_pdb() script rather than Model.read() to read in any original PDB file.
If the model contains any disulfide bridges, CONECT and SSBOND records for each bridge are included when writing out PDB files (note that CONECT records for other contacts, such as between HETATM residues, are not included). For mmCIF files, equivalent _struct_conn records are written.
A number of MODELLER-specific REMARKs are added when writing out PDB files (and are parsed when reading such files back in with Model.read()). For mmCIF files, the same information is stored in the '_modeller' or '_modeller_blk' categories (shown in parentheses below):
The contents of Model.remark are also added to PDB files verbatim.
If no_ter is set to True then no TER records are written to PDB files (normally these are added at the end of each amino acid chain).
If extra_data is given, its contents are also added to PDB or mmCIF files verbatim (so it must be formatted correctly for each format).
Example: See Model.read() command.