IMP  2.1.1
The Integrative Modeling Platform
pdb.h File Reference

Functions to read pdbs. More...

#include <IMP/atom/atom_config.h>
#include "Hierarchy.h"
#include "Atom.h"
#include "element.h"
#include "internal/pdb.h"
#include "atom_macros.h"
#include <IMP/base/file.h>
#include "Selection.h"
#include <IMP/kernel/Model.h>
#include <IMP/kernel/Particle.h>
#include <IMP/kernel/OptimizerState.h>
#include <IMP/kernel/internal/utility.h>
#include <boost/format.hpp>
+ Include dependency graph for pdb.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IMP::atom::AllPDBSelector
 Defines a selector that will pick every ATOM and HETATM record. More...
 
class  IMP::atom::AndPDBSelector
 Select atoms which are selected by both selectors. More...
 
class  IMP::atom::ATOMPDBSelector
 Select all non-alternative ATOM records. More...
 
class  IMP::atom::BackbonePDBSelector
 Select all backbone (N,CA,C,O) ATOM records. More...
 
class  IMP::atom::CAlphaPDBSelector
 Select all CA ATOM records. More...
 
class  IMP::atom::CBetaPDBSelector
 Select all CB ATOM records. More...
 
class  IMP::atom::ChainPDBSelector
 Select all ATOM and HETATMrecords with the given chain ids. More...
 
class  IMP::atom::CPDBSelector
 Select all C (not CA or CB) ATOM records. More...
 
class  IMP::atom::HydrogenPDBSelector
 Select all hydrogen ATOM and HETATM records. More...
 
class  IMP::atom::NonAlternativePDBSelector
 Select all ATOM and HETATM records which are not alternatives. More...
 
class  IMP::atom::NonWaterNonHydrogenPDBSelector
 Select non water and non hydrogen atoms. More...
 
class  IMP::atom::NonWaterPDBSelector
 Select all non-water non-alternative ATOM and HETATM records. More...
 
class  IMP::atom::NotPDBSelector
 Select atoms which not selected by a given selector. More...
 
class  IMP::atom::NPDBSelector
 Select all N ATOM records. More...
 
class  IMP::atom::OrPDBSelector
 Select atoms which are selected by either selector. More...
 
class  IMP::atom::PDBSelector
 Select which atoms to read from a PDB file. More...
 
class  IMP::atom::PPDBSelector
 Select all P (= phosphate) ATOM records. More...
 
class  IMP::atom::WaterPDBSelector
 Select all non-water ATOM and HETATMrecords. More...
 
class  IMP::atom::WritePDBOptimizerState
 

Namespaces

 IMP
 All IMP::kernel code is brought into the IMP namespace.
 
 IMP::atom
 See IMP.atom for more information.
 

Typedefs

typedef IMP::base::Vector
< IMP::base::Pointer
< PDBSelector > > 
IMP::atom::PDBSelectors
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< PDBSelector > > 
IMP::atom::PDBSelectorsTemp
 

PDB Reading

The read PDB methods produce a hierarchy that looks as follows:

  • One Atom per ATOM or HETATM record in the PDB.
  • All Atom particles have a parent which is a Residue.
  • All Residue particles have a parent which is a Chain.

Waters are currently dropped if they are ATOM records. This can be fixed.

The read_pdb() functions should successfully parse all valid pdb files. It can produce warnings on files which are not valid. It will attempt to read such files, but all bets are off.

When reading PDBs, PDBSelector objects can be used to choose to only process certain record types. See the class documentation for more information. When no PDB selector is supplied for reading, the NonWaterPDBSelector is used.

Set the IMP::LogLevel to VERBOSE to see details of parse errors.

PDBSelector * IMP::atom::get_default_pdb_selector ()
 
Hierarchy IMP::atom::read_pdb (base::TextInput input, kernel::Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
 
void IMP::atom::read_pdb (base::TextInput input, int model, Hierarchy h)
 
Hierarchies IMP::atom::read_multimodel_pdb (base::TextInput input, kernel::Model *model, PDBSelector *selector=)
 

PDB Writing

The methods to write a PDBs expects a Hierarchy that looks as follows:

  • all leaves are Atom particles
  • all Atom particles have Residue particles as parents

All Residue particles that have a Chain particle as an ancestor are considered part of a protein, DNA or RNA, ones without are considered heterogens.

The functions produce files that are not valid PDB files, eg only ATOM/HETATM lines are printed for all Atom particles in the hierarchy. Complain if your favorite program can't read them and we might fix it.

void IMP::atom::write_pdb (const Selection &mhd, base::TextOutput out, unsigned int model=1)
 
void IMP::atom::write_pdb_of_c_alphas (const Selection &mhd, base::TextOutput out, unsigned int model=1)
 Write a hierarchy to a pdb as C_alpha atoms. More...
 
void IMP::atom::write_multimodel_pdb (const Hierarchies &mhd, base::TextOutput out)
 

Detailed Description

Copyright 2007-2013 IMP Inventors. All rights reserved.

Definition in file pdb.h.