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

model.read() -- read coordinates for MODEL

io = <io_data>   Options for reading atom files
aln = <alignment>   Alignment to use for model_segment
file = <str:1> 'default' name of the coordinates' file
model_segment = <str:2> 'FIRST:@' 'LAST:' segment to be read in
model_format = <str:1> 'PDB' selects input atom file format: 'PDB' | 'CHARMM' | 'UHBD'

Description:
This command reads the atomic coordinates, atom names, residue names, residue numbers, isotropic temperature factors and segment specifications for MODEL, assigns residue types, and defines the dihedral angles listed in the $RESDIH_LIB library. For CHARMM and UHBD file formats, it also reads the atomic charges. However, it does not assign CHARMM and MODELLER atom types, internal coordinates, charges (in the case of the 'PDB' format), or patches (such as disulfides); to make these assignments, which are necessary for almost all energy commands, use model.generate_topology(). All real and pseudo atoms are selected. The PDB residue type 'HIS' is assigned the CHARMM residue type 'HSD', which is the neutral His with H on ND1. The PDB types 'ASP' and 'GLU' are assigned the corresponding charged CHARMM residue types, as are 'LYS' and 'ARG'. These conventions are relevant only if electrostatic terms and/or hydrogens are used.

model_segment sets the beginning and ending residue identifiers for the contiguous sequence of residues to be read from the PDB file (this option does not work yet for the other file formats). The format of residue identifiers is described in Section 4.9.1. In addition, the following rule applies: If there is no `:' in the first residue specification, the segment specification is taken from the alignment entry with the specified code (in which case this command must be passed an alignment). Similarly, if there is no `:' in the second residue specification, the PDB filename is taken from the alignment entry with the specified code. The two codes do not have to be the same. For example, model_segment = '4ape' '4ape' will take the segment specification and atom filename for entry 4ape in the alignment.

Example: examples/commands/read_model.py


# Example for: model.read(), model.write()

# This will read a PDB file and write a CHARMM atom file without atomic charges
# or radii. For assigning charges and radii, see the all_hydrogen.py script.

env = environ()

mdl = model(env)
mdl.read(file='1fas')
mdl.write(file='1fas.crd', model_format='CHARMM')
mdl.write(file='1fas.cif', model_format='MMCIF')


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