IMP logo
IMP Reference Guide  2.8.0
The Integrative Modeling Platform
pdb.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/pdb.h
3  * \brief Functions to read PDBs
4  *
5  * Copyright 2007-2017 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPATOM_PDB_H
10 #define IMPATOM_PDB_H
11 
12 #include <IMP/atom/atom_config.h>
13 #include "Hierarchy.h"
14 #include "Atom.h"
15 #include "element.h"
16 #include "internal/pdb.h"
17 #include "atom_macros.h"
18 #include <IMP/file.h>
19 #include "Selection.h"
20 #include <IMP/Model.h>
21 #include <IMP/Particle.h>
22 #include <IMP/OptimizerState.h>
23 #include <IMP/internal/utility.h>
24 #include <boost/format.hpp>
25 #include <boost/algorithm/string.hpp>
26 
27 IMPATOM_BEGIN_NAMESPACE
28 
29 //! Select which atoms to read from a PDB file
30 /** Selector is a general purpose class used to select records from a PDB
31  file. Using descendants of this class one may implement arbitrary
32  selection functions with operator() and pass them to PDB reading functions
33  for object selection. Simple selectors can be used to build more complicated
34  ones. Inheritance means "AND" unless otherwise noted (that is, the
35  CAlphaPDBSelector takes all non-alternate C-alphas since it inherits from
36  NonAlternativePDBSelector).
37 
38  \see read_pdb
39 */
40 class IMPATOMEXPORT PDBSelector : public IMP::Object {
41  public:
42  PDBSelector(std::string name) : Object(name) {}
43  //! Return true if the line should be processed
44  virtual bool get_is_selected(const std::string &pdb_line) const = 0;
45  virtual ~PDBSelector();
46 };
47 
49 
50 //! Select all ATOM and HETATM records which are not alternatives
52  public:
53  NonAlternativePDBSelector(std::string name = "NonAlternativePDBSelector%1%")
54  : PDBSelector(name) {}
55 
56  bool get_is_selected(const std::string &pdb_line) const {
57  return (internal::atom_alt_loc_indicator(pdb_line) == ' ' ||
58  internal::atom_alt_loc_indicator(pdb_line) == 'A');
59  }
61 };
62 
63 //! Select all non-alternative ATOM records
65  public:
66  ATOMPDBSelector(std::string name = "ATOMPDBSelector%1%")
67  : NonAlternativePDBSelector(name) {}
68 
69  bool get_is_selected(const std::string &pdb_line) const {
70  return (NonAlternativePDBSelector::get_is_selected(pdb_line) &&
71  internal::is_ATOM_rec(pdb_line));
72  }
74 };
75 
76 //! Select all CA ATOM records
78  public:
79  CAlphaPDBSelector(std::string name = "CAlphaPDBSelector%1%")
80  : NonAlternativePDBSelector(name) {}
81 
82  bool get_is_selected(const std::string &pdb_line) const {
83  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
84  const std::string type = internal::atom_type(pdb_line);
85  return (type[1] == 'C' && type[2] == 'A' && type[3] == ' ');
86  }
88 };
89 
90 //! Select all CB ATOM records
92  public:
93  CBetaPDBSelector(std::string name = "CBetaPDBSelector%1%")
94  : NonAlternativePDBSelector(name) {}
95 
96  bool get_is_selected(const std::string &pdb_line) const {
97  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
98  const std::string type = internal::atom_type(pdb_line);
99  return (type[1] == 'C' && type[2] == 'B' && type[3] == ' ');
100  }
102 };
103 
104 //! Select all atoms of the given types
105 /** Note that unlike CAlphaPDBSelector and similar classes, this selects all
106  atoms, even those in alternative locations (combine with
107  a NonAlternativePDBSelector if necessary).
108  */
110  Strings atom_types_;
111  public:
112  AtomTypePDBSelector(Strings atom_types,
113  std::string name = "AtomTypePDBSelector%1%")
114  : PDBSelector(name), atom_types_(atom_types) {
115  std::sort(atom_types_.begin(), atom_types_.end());
116  }
117 
118  bool get_is_selected(const std::string &pdb_line) const {
119  std::string type = internal::atom_type(pdb_line);
120  boost::trim(type);
121  return std::binary_search(atom_types_.begin(), atom_types_.end(), type);
122  }
124 };
125 
126 //! Select all atoms in residues of the given types
127 /** Note that unlike CAlphaPDBSelector and similar classes, this selects all
128  atoms, even those in alternative locations (combine with
129  a NonAlternativePDBSelector if necessary).
130  */
132  Strings residue_types_;
133  public:
134  ResidueTypePDBSelector(Strings residue_types,
135  std::string name = "ResidueTypePDBSelector%1%")
136  : PDBSelector(name), residue_types_(residue_types) {
137  std::sort(residue_types_.begin(), residue_types_.end());
138  }
139 
140  bool get_is_selected(const std::string &pdb_line) const {
141  std::string type = internal::atom_residue_name(pdb_line);
142  boost::trim(type);
143  return std::binary_search(residue_types_.begin(), residue_types_.end(),
144  type);
145  }
147 };
148 
149 //! Select all C (not CA or CB) ATOM records
151  public:
152  CPDBSelector(std::string name = "CPDBSelector%1%")
153  : NonAlternativePDBSelector(name) {}
154 
155  bool get_is_selected(const std::string &pdb_line) const {
156  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
157  const std::string type = internal::atom_type(pdb_line);
158  return (type[1] == 'C' && type[2] == ' ' && type[3] == ' ');
159  }
161 };
162 
163 //! Select all N ATOM records
165  public:
166  NPDBSelector(std::string name = "NPDBSelector%1%")
167  : NonAlternativePDBSelector(name) {}
168 
169  bool get_is_selected(const std::string &pdb_line) const {
170  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
171  const std::string type = internal::atom_type(pdb_line);
172  return (type[1] == 'N' && type[2] == ' ' && type[3] == ' ');
173  }
175 };
176 
177 //! Defines a selector that will pick every ATOM and HETATM record
178 class AllPDBSelector : public PDBSelector {
179  public:
180  AllPDBSelector(std::string name = "AllPDBSelector%1%") : PDBSelector(name) {}
181 
182  bool get_is_selected(const std::string &pdb_line) const {
183  return (true || pdb_line.empty());
184  }
186 };
187 
188 //! Select all ATOM and HETATM records with the given chain ids
190  public:
191  bool get_is_selected(const std::string &pdb_line) const {
192  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) {
193  return false;
194  }
195  for (int i = 0; i < (int)chains_.length(); i++) {
196  if (internal::atom_chain_id(pdb_line) == chains_[i]) return true;
197  }
198  return false;
199  }
201  //! The chain id can be any character in chains
202  ChainPDBSelector(const std::string &chains,
203  std::string name = "ChainPDBSelector%1%")
204  : NonAlternativePDBSelector(name), chains_(chains) {}
205 
206  private:
207  std::string chains_;
208 };
209 
210 //! Select all non-water ATOM and HETATM records
212  public:
213  WaterPDBSelector(std::string name = "WaterPDBSelector%1%")
214  : NonAlternativePDBSelector(name) {}
215 
216  bool get_is_selected(const std::string &pdb_line) const {
217  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) {
218  return false;
219  }
220  const std::string res_name = internal::atom_residue_name(pdb_line);
221  return ((res_name[0] == 'H' && res_name[1] == 'O' && res_name[2] == 'H') ||
222  (res_name[0] == 'D' && res_name[1] == 'O' && res_name[2] == 'D'));
223  }
225 };
226 
227 //! Select all hydrogen ATOM and HETATM records
228 class IMPATOMEXPORT HydrogenPDBSelector : public NonAlternativePDBSelector {
229  bool is_hydrogen(std::string pdb_line) const;
230 
231  public:
232  HydrogenPDBSelector(std::string name = "HydrogenPDBSelector%1%")
233  : NonAlternativePDBSelector(name) {}
234 
235  bool get_is_selected(const std::string &pdb_line) const {
236  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
237  return is_hydrogen(pdb_line);
238  }
240 };
241 
242 //! Select non water and non hydrogen atoms
245 
246  public:
247  bool get_is_selected(const std::string &pdb_line) const {
248  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) {
249  return false;
250  }
251  return (!ws_->get_is_selected(pdb_line) && !hs_->get_is_selected(pdb_line));
252  }
254  NonWaterNonHydrogenPDBSelector(std::string name)
256  ws_(new WaterPDBSelector()),
257  hs_(new HydrogenPDBSelector()) {}
259  : NonAlternativePDBSelector("NonWaterPDBSelector%1%"),
260  ws_(new WaterPDBSelector()),
261  hs_(new HydrogenPDBSelector()) {}
262 };
263 
264 //! Select non hydrogen atoms
267 
268  public:
269  bool get_is_selected(const std::string &pdb_line) const {
270  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) {
271  return false;
272  }
273  return (!hs_->get_is_selected(pdb_line));
274  }
276  NonHydrogenPDBSelector(std::string name)
278  hs_(new HydrogenPDBSelector()) {}
280  : NonAlternativePDBSelector("NonHydrogenPDBSelector%1%"),
281  hs_(new HydrogenPDBSelector()) {}
282 };
283 
284 //! Select all non-water non-alternative ATOM and HETATM records
287 
288  public:
289  bool get_is_selected(const std::string &pdb_line) const {
290  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) {
291  return false;
292  }
293  return (!ws_->get_is_selected(pdb_line));
294  }
296  NonWaterPDBSelector(std::string name)
297  : NonAlternativePDBSelector(name), ws_(new WaterPDBSelector()) {}
299  : NonAlternativePDBSelector("NonWaterPDBSelector%1%"),
300  ws_(new WaterPDBSelector()) {}
301 };
302 
303 //! Select all backbone (N,CA,C,O) ATOM records
305  public:
306  BackbonePDBSelector(std::string name = "BackbonePDBSelector%1%")
308 
309  bool get_is_selected(const std::string &pdb_line) const {
310  if (!NonWaterNonHydrogenPDBSelector::get_is_selected(pdb_line))
311  return false;
312  const std::string type = internal::atom_type(pdb_line);
313  return ((type[1] == 'N' && type[2] == ' ' && type[3] == ' ') ||
314  (type[1] == 'C' && type[2] == 'A' && type[3] == ' ') ||
315  (type[1] == 'C' && type[2] == ' ' && type[3] == ' ') ||
316  (type[1] == 'O' && type[2] == ' ' && type[3] == ' '));
317  }
319 };
320 
321 //! Select all P (= phosphate) ATOM records
323  public:
324  PPDBSelector(std::string name = "PPDBSelector%1%")
325  : NonAlternativePDBSelector(name) {}
326 
327  bool get_is_selected(const std::string &pdb_line) const {
328  if (!NonAlternativePDBSelector::get_is_selected(pdb_line)) return false;
329  const std::string type = internal::atom_type(pdb_line);
330  return (type[1] == 'P' && type[2] == ' ' && type[3] == ' ');
331  }
333 };
334 
335 //! Select atoms which are selected by both selectors
336 /** To use do something like
337  \code
338  read_pdb(name, m, AndPDBSelector(PPDBSelector(), WaterPDBSelector()));
339  \endcode
340 
341  In Python, the and operator (&) can be used to the same effect:
342  \code
343  read_pdb(name, m, PPDBSelector() & WaterPDBSelector());
344  \endcode
345  */
346 class AndPDBSelector : public PDBSelector {
347  const IMP::PointerMember<PDBSelector> a_, b_;
348 
349  public:
350  bool get_is_selected(const std::string &pdb_line) const {
351  return a_->get_is_selected(pdb_line) && b_->get_is_selected(pdb_line);
352  }
355  : PDBSelector("AndPDBSelector%1%"), a_(a), b_(b) {}
356 };
357 
358 //! Select atoms which are selected by either or both selectors
359 /** To use do something like
360  \code
361  read_pdb(name, m, OrPDBSelector(PPDBSelector(), WaterPDBSelector()));
362  \endcode
363 
364  In Python, the or operator (|) can be used to the same effect:
365  \code
366  read_pdb(name, m, PPDBSelector() | WaterPDBSelector());
367  \endcode
368  */
369 class OrPDBSelector : public PDBSelector {
370  const IMP::PointerMember<PDBSelector> a_, b_;
371 
372  public:
373  bool get_is_selected(const std::string &pdb_line) const {
374  return a_->get_is_selected(pdb_line) || b_->get_is_selected(pdb_line);
375  }
378  : PDBSelector("OrPDBSelector%1%"), a_(a), b_(b) {}
379 };
380 
381 //! Select atoms which are selected by either selector but not both
382 /** To use do something like
383  \code
384  read_pdb(name, m, XorPDBSelector(HydrogenPDBSelector(),
385  WaterPDBSelector()));
386  \endcode
387 
388  In Python, the xor operator (^) can be used to the same effect:
389  \code
390  read_pdb(name, m, HydrogenPDBSelector() ^ WaterPDBSelector());
391  \endcode
392  */
393 class XorPDBSelector : public PDBSelector {
394  const IMP::PointerMember<PDBSelector> a_, b_;
395 
396  public:
397  bool get_is_selected(const std::string &pdb_line) const {
398  return a_->get_is_selected(pdb_line) != b_->get_is_selected(pdb_line);
399  }
402  : PDBSelector("XorPDBSelector%1%"), a_(a), b_(b) {}
403 };
404 
405 //! Select atoms which are not selected by a given selector
406 /** To use do something like
407  \code
408  read_pdb(name, m, NotPDBSelector(PPDBSelector()));
409  \endcode
410 
411  In Python, the inversion operator (~) can be used to the same effect:
412  \code
413  read_pdb(name, m, ~PPDBSelector());
414  \endcode
415  */
416 class NotPDBSelector : public PDBSelector {
418 
419  public:
420  bool get_is_selected(const std::string &pdb_line) const {
421  return !a_->get_is_selected(pdb_line);
422  }
424  NotPDBSelector(PDBSelector *a) : PDBSelector("NotPDBSelector%1%"), a_(a) {}
425 };
426 
427 /** @name PDB Reading
428  \anchor pdb_in
429  The read PDB methods produce a hierarchy that looks as follows:
430  - One Atom per ATOM or HETATM record in the PDB.
431  - All Atom particles have a parent which is a Residue.
432  - All Residue particles have a parent which is a Chain.
433 
434  Waters are currently dropped if they are ATOM records. This can be fixed.
435 
436  The read_pdb() functions should successfully parse all valid PDB files. It
437  can produce warnings on files which are not valid. It will attempt to read
438  such files, but all bets are off.
439 
440  In order to track the provenance of IMP-generated models, the provenance
441  of any PDB files read in here - for example, the PDB id, or detail about
442  a comparative model - needs to also be tracked. This is done using the
443  PDB headers:
444  - Structures stored in the PDB database should keep the standard
445  `HEADER` record stating their PDB ID.
446  - Comparative models generated using MODELLER should include the
447  MODELLER-generated `EXPDTA` and `REMARK` records.
448  - Structures that are trivial modifications of an existing PDB structure
449  or comparative model should use the `TITLE` record to describe the
450  nature of the modification (e.g. rotation and translation) and one of
451  the two following custom `EXPDTA` record formats to point to the original
452  structure:
453  - `EXPDTA DERIVED FROM PDB:1XYZ`
454  - `EXPDTA DERIVED FROM COMPARATIVE MODEL, DOI:x.y/z`
455  - Structures generated from multiple sources (e.g. two structures that
456  have been docked and then concatenated into a single PDB file) are not
457  allowed. Store each constituent structure in its own file and annotate
458  each one with a suitable `EXPDTA` record, as above.
459  Note that while provenance of PDB files is not currently enforced, it
460  likely will be in future IMP releases.
461 
462  When reading PDBs, PDBSelector objects can be used to choose to only process
463  certain record types. See the class documentation for more information.
464  When no PDB selector is supplied for reading, the
465  NonWaterPDBSelector is used.
466 
467  Set the IMP::LogLevel to VERBOSE to see details of parse errors.
468 */
469 //!@{
470 
471 inline PDBSelector *get_default_pdb_selector() {
472  return new NonWaterPDBSelector();
473 }
474 
475 /** Read a all the molecules in the first model of the
476  PDB file.
477  */
478 IMPATOMEXPORT Hierarchy
479  read_pdb(TextInput input, Model *model,
480  PDBSelector *selector = get_default_pdb_selector(),
481  bool select_first_model = true
482 #ifndef IMP_DOXYGEN
483  ,
484  bool no_radii = false
485 #endif
486  );
487 
488 /** Rewrite the coordinates of the passed hierarchy based
489  on the contents of the first model in the PDB file.
490 
491  The hierarchy must have been created by reading from a PDB
492  file and the atom numbers must correspond between the files.
493  These are not really checked.
494 
495  A ValueException is thrown if there are insufficient models
496  in the file.
497 
498  core::RigidMember particles are handled by updating the
499  core::RigidBody algebra::ReferenceFrame3D to align with the
500  loaded particles. Bad things will happen if the loaded coordinates
501  are not a rigid transform of the prior coordinates.
502  */
503 IMPATOMEXPORT void read_pdb(TextInput input, int model, Hierarchy h);
504 
505 /** Read all models from the PDB file.
506  */
507 IMPATOMEXPORT Hierarchies
508  read_multimodel_pdb(TextInput input, Model *model,
509  PDBSelector *selector = get_default_pdb_selector()
510 #ifndef IMP_DOXYGEN
511  ,
512  bool noradii = false
513 #endif
514  );
515 
516 /** @name PDB Writing
517  \anchor pdb_out
518  The methods to write a PDB expects a Hierarchy that looks as follows:
519  - all leaves are Atom particles
520  - all Atom particles have Residue particles as parents
521 
522  All Residue particles that have a Chain particle as an ancestor
523  are considered part of a protein, DNA or RNA, ones without are
524  considered heterogens.
525 
526  The functions produce files that are not valid PDB files,
527  eg only ATOM/HETATM lines are printed for all Atom particles
528  in the hierarchy. Complain if your favorite program can't read them and
529  we might fix it.
530 */
531 //!@{
532 
533 /** Write some atoms to a PDB.
534 */
535 IMPATOMEXPORT void write_pdb(const Selection &mhd, TextOutput out,
536  unsigned int model = 1);
537 
538 /** \brief Write a hierarchy to a PDB as C_alpha atoms.
539 
540  This method is used to write a non-atomic hierarchy into a PDB in a way
541  that can be read by most programs. If the leaves are Residue particles
542  then the index and residue type will be read from them. Otherwise default
543  values will be used so that each leaf ends up in a separate residue.
544 */
545 IMPATOMEXPORT void write_pdb_of_c_alphas(const Selection &mhd,
546  TextOutput out,
547  unsigned int model = 1);
548 
549 /** Write the hierarchies one per frame.
550 */
551 IMPATOMEXPORT void write_multimodel_pdb(const Hierarchies &mhd,
552  TextOutput out);
553 /** @} */
554 
555 #ifndef IMP_DOXYGEN
556 
557 /**
558  This function returns a string in PDB ATOM format
559 */
560 IMPATOMEXPORT std::string get_pdb_string(
561  const algebra::Vector3D &v, int index = -1, AtomType at = AT_CA,
562  ResidueType rt = atom::ALA, char chain = ' ', int res_index = 1,
563  char res_icode = ' ', double occupancy = 1.00, double tempFactor = 0.00,
564  Element e = C);
565 
566 /**
567  This function returns a connectivity string in PDB format
568  \note The CONECT records specify connectivity between atoms for which
569  coordinates are supplied. The connectivity is described using
570  the atom serial number as found in the entry.
571  \note http://www.bmsc.washington.edu/CrystaLinks/man/pdb/guide2.2_frame.html
572 */
573 IMPATOMEXPORT std::string get_pdb_conect_record_string(int, int);
574 #endif
575 
576 /** \class WritePDBOptimizerState
577  This writes a PDB file at the specified interval during optimization.
578  If the file name contains %1% then a new file is written each time
579  with the %1% replaced by the index. Otherwise a new model is written
580  each time to the same file.
581 */
582 class IMPATOMEXPORT WritePDBOptimizerState : public OptimizerState {
583  std::string filename_;
584  ParticleIndexes pis_;
585 
586  public:
588  const ParticleIndexesAdaptor &pis,
589  std::string filename);
590  WritePDBOptimizerState(const atom::Hierarchies mh, std::string filename);
591 
592  protected:
593  virtual void do_update(unsigned int call) IMP_OVERRIDE;
596 };
597 
598 IMPATOM_END_NAMESPACE
599 
600 #endif /* IMPATOM_PDB_H */
Select non water and non hydrogen atoms.
Definition: pdb.h:243
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:420
ChainPDBSelector(const std::string &chains, std::string name="ChainPDBSelector%1%")
The chain id can be any character in chains.
Definition: pdb.h:202
Define the elements used in IMP.
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:56
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:216
Select all backbone (N,CA,C,O) ATOM records.
Definition: pdb.h:304
Select all non-water ATOM and HETATM records.
Definition: pdb.h:211
Select all P (= phosphate) ATOM records.
Definition: pdb.h:322
Select non hydrogen atoms.
Definition: pdb.h:265
const AtomType AT_CA
Select atoms which are selected by both selectors.
Definition: pdb.h:346
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:327
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Simple atom decorator.
Storage of a model, its restraints, constraints and particles.
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:118
Select all N ATOM records.
Definition: pdb.h:164
void write_pdb(const Selection &mhd, TextOutput out, unsigned int model=1)
virtual ModelObjectsTemp do_get_inputs() const
Handling of file input/output.
virtual void do_update(unsigned int)
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:169
Select all atoms in residues of the given types.
Definition: pdb.h:131
void read_pdb(TextInput input, int model, Hierarchy h)
A more IMP-like version of the std::vector.
Definition: Vector.h:39
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:397
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:69
Select all C (not CA or CB) ATOM records.
Definition: pdb.h:150
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
void write_pdb_of_c_alphas(const Selection &mhd, TextOutput out, unsigned int model=1)
Write a hierarchy to a PDB as C_alpha atoms.
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:191
Decorator for helping deal with a hierarchy of molecules.
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:82
Select all CB ATOM records.
Definition: pdb.h:91
Select all ATOM and HETATM records which are not alternatives.
Definition: pdb.h:51
Select all non-alternative ATOM records.
Definition: pdb.h:64
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:155
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:350
Common base class for heavy weight IMP objects.
Definition: Object.h:106
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:269
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:96
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:140
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:289
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:247
Select all atoms of the given types.
Definition: pdb.h:109
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
Defines a selector that will pick every ATOM and HETATM record.
Definition: pdb.h:178
Various important macros for implementing decorators.
Select atoms which are not selected by a given selector.
Definition: pdb.h:416
Hierarchies read_multimodel_pdb(TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector())
Object(std::string name)
Construct an object with the given name.
VectorD< 3 > Vector3D
Definition: VectorD.h:395
Shared optimizer state that is invoked upon commitment of new coordinates.
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:182
Select all non-water non-alternative ATOM and HETATM records.
Definition: pdb.h:285
Select atoms which are selected by either or both selectors.
Definition: pdb.h:369
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:309
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:373
Shared optimizer state.
void write_multimodel_pdb(const Hierarchies &mhd, TextOutput out)
bool get_is_selected(const std::string &pdb_line) const
Return true if the line should be processed.
Definition: pdb.h:235
Select all hydrogen ATOM and HETATM records.
Definition: pdb.h:228
Select all CA ATOM records.
Definition: pdb.h:77
Element
The various elements currently supported/known.
Definition: element.h:23
Select which atoms to read from a PDB file.
Definition: pdb.h:40
Select a subset of a hierarchy.
Select atoms which are selected by either selector but not both.
Definition: pdb.h:393
Select all ATOM and HETATM records with the given chain ids.
Definition: pdb.h:189
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.