IMP logo
IMP Reference Guide  2.7.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  When reading PDBs, PDBSelector objects can be used to choose to only process
441  certain record types. See the class documentation for more information.
442  When no PDB selector is supplied for reading, the
443  NonWaterPDBSelector is used.
444 
445  Set the IMP::LogLevel to VERBOSE to see details of parse errors.
446 */
447 //!@{
448 
449 inline PDBSelector *get_default_pdb_selector() {
450  return new NonWaterPDBSelector();
451 }
452 
453 /** Read a all the molecules in the first model of the
454  PDB file.
455  */
456 IMPATOMEXPORT Hierarchy
457  read_pdb(TextInput input, Model *model,
458  PDBSelector *selector = get_default_pdb_selector(),
459  bool select_first_model = true
460 #ifndef IMP_DOXYGEN
461  ,
462  bool no_radii = false
463 #endif
464  );
465 
466 /** Rewrite the coordinates of the passed hierarchy based
467  on the contents of the first model in the PDB file.
468 
469  The hierarchy must have been created by reading from a PDB
470  file and the atom numbers must correspond between the files.
471  These are not really checked.
472 
473  A ValueException is thrown if there are insufficient models
474  in the file.
475 
476  core::RigidMember particles are handled by updating the
477  core::RigidBody algebra::ReferenceFrame3D to align with the
478  loaded particles. Bad things will happen if the loaded coordinates
479  are not a rigid transform of the prior coordinates.
480  */
481 IMPATOMEXPORT void read_pdb(TextInput input, int model, Hierarchy h);
482 
483 /** Read all models from the PDB file.
484  */
485 IMPATOMEXPORT Hierarchies
486  read_multimodel_pdb(TextInput input, Model *model,
487  PDBSelector *selector = get_default_pdb_selector()
488 #ifndef IMP_DOXYGEN
489  ,
490  bool noradii = false
491 #endif
492  );
493 
494 /** @name PDB Writing
495  \anchor pdb_out
496  The methods to write a PDB expects a Hierarchy that looks as follows:
497  - all leaves are Atom particles
498  - all Atom particles have Residue particles as parents
499 
500  All Residue particles that have a Chain particle as an ancestor
501  are considered part of a protein, DNA or RNA, ones without are
502  considered heterogens.
503 
504  The functions produce files that are not valid PDB files,
505  eg only ATOM/HETATM lines are printed for all Atom particles
506  in the hierarchy. Complain if your favorite program can't read them and
507  we might fix it.
508 */
509 //!@{
510 
511 /** Write some atoms to a PDB.
512 */
513 IMPATOMEXPORT void write_pdb(const Selection &mhd, TextOutput out,
514  unsigned int model = 1);
515 
516 /** \brief Write a hierarchy to a PDB as C_alpha atoms.
517 
518  This method is used to write a non-atomic hierarchy into a PDB in a way
519  that can be read by most programs. If the leaves are Residue particles
520  then the index and residue type will be read from them. Otherwise default
521  values will be used so that each leaf ends up in a separate residue.
522 */
523 IMPATOMEXPORT void write_pdb_of_c_alphas(const Selection &mhd,
524  TextOutput out,
525  unsigned int model = 1);
526 
527 /** Write the hierarchies one per frame.
528 */
529 IMPATOMEXPORT void write_multimodel_pdb(const Hierarchies &mhd,
530  TextOutput out);
531 /** @} */
532 
533 #ifndef IMP_DOXYGEN
534 
535 /**
536  This function returns a string in PDB ATOM format
537 */
538 IMPATOMEXPORT std::string get_pdb_string(
539  const algebra::Vector3D &v, int index = -1, AtomType at = AT_CA,
540  ResidueType rt = atom::ALA, char chain = ' ', int res_index = 1,
541  char res_icode = ' ', double occupancy = 1.00, double tempFactor = 0.00,
542  Element e = C);
543 
544 /**
545  This function returns a connectivity string in PDB format
546  \note The CONECT records specify connectivity between atoms for which
547  coordinates are supplied. The connectivity is described using
548  the atom serial number as found in the entry.
549  \note http://www.bmsc.washington.edu/CrystaLinks/man/pdb/guide2.2_frame.html
550 */
551 IMPATOMEXPORT std::string get_pdb_conect_record_string(int, int);
552 #endif
553 
554 /** \class WritePDBOptimizerState
555  This writes a PDB file at the specified interval during optimization.
556  If the file name contains %1% then a new file is written each time
557  with the %1% replaced by the index. Otherwise a new model is written
558  each time to the same file.
559 */
560 class IMPATOMEXPORT WritePDBOptimizerState : public OptimizerState {
561  std::string filename_;
562  ParticleIndexes pis_;
563 
564  public:
566  const ParticleIndexesAdaptor &pis,
567  std::string filename);
568  WritePDBOptimizerState(const atom::Hierarchies mh, std::string filename);
569 
570  protected:
571  virtual void do_update(unsigned int call) IMP_OVERRIDE;
574 };
575 
576 IMPATOM_END_NAMESPACE
577 
578 #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.