IMP  2.3.0
The Integrative Modeling Platform
structure_from_sequence.py
1 ## \example atom/structure_from_sequence.py
2 # An atomic protein structure is created from primary (amino-acid) sequence.
3 #
4 
5 import IMP.atom
6 
7 # Use the CHARMM all-atom (i.e. including hydrogens) topology and parameters
9 
10 # Create a single chain of amino acids and apply the standard C- and N-
11 # termini patches
12 topology.add_sequence('IACGACKPECPVNIIQGS')
13 topology.apply_default_patches()
14 
15 # Make an IMP Hierarchy (atoms, residues, chains) that corresponds to
16 # this topology
17 m = IMP.kernel.Model()
18 h = topology.create_hierarchy(m)
19 
20 # Generate coordinates for all atoms in the Hierarchy, using CHARMM internal
21 # coordinate information (an extended chain conformation will be produced).
22 # Since in some cases this information can be incomplete, better results will
23 # be obtained if the atom types are assigned first and the CHARMM parameters
24 # file is loaded, as we do here, so missing information can be filled in.
25 # It will still work without that information, but will approximate the
26 # coordinates.
27 topology.add_atom_types(h)
28 topology.add_coordinates(h)
29 
30 # Hierarchies in IMP must have radii
32 
33 # Write out the final structure to a PDB file
34 IMP.atom.write_pdb(h, 'structure.pdb')
void write_pdb(const Selection &mhd, base::TextOutput out, unsigned int model=1)
void add_radii(Hierarchy d, const ForceFieldParameters *ffp=get_all_atom_CHARMM_parameters(), FloatKey radius_key=FloatKey("radius"))
The topology of a complete CHARMM model.
Functionality for loading, creating, manipulating and scoring atomic structures.
CHARMMParameters * get_all_atom_CHARMM_parameters()
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73