IMP logo
IMP Reference Guide  2.5.0
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/file.h>
#include "Selection.h"
#include <IMP/Model.h>
#include <IMP/Particle.h>
#include <IMP/OptimizerState.h>
#include <IMP/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 HETATM records 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 are 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 HETATM records. More...
 
class  IMP::atom::WritePDBOptimizerState
 

Namespaces

 IMP
 Base functionality and abstract base classes for representation, scoring and sampling.
 
 IMP::atom
 Functionality for loading, creating, manipulating and scoring atomic structures.
 

Typedefs

typedef IMP::Vector
< IMP::Pointer< PDBSelector > > 
IMP::atom::PDBSelectors
 
typedef IMP::Vector
< IMP::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 (TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
 
void IMP::atom::read_pdb (TextInput input, int model, Hierarchy h)
 
Hierarchies IMP::atom::read_multimodel_pdb (TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector())
 

PDB Writing

The methods to write a PDB 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, TextOutput out, unsigned int model=1)
 
void IMP::atom::write_pdb_of_c_alphas (const Selection &mhd, 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, TextOutput out)
 

Detailed Description

Functions to read PDBs.

Copyright 2007-2015 IMP Inventors. All rights reserved.

Definition in file pdb.h.