IMP  2.2.1
The Integrative Modeling Platform
atom/structure_from_sequence.py

An atomic protein structure is created from primary (amino-acid) sequence.

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')