BALL  1.5.0
NMRStarFile.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_FORMAT_NMRSTARFILE_H
6 #define BALL_FORMAT_NMRSTARFILE_H
7 
8 #ifndef BALL_FORMAT_CIFFILE_H
9 # include <BALL/FORMAT/CIFFile.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_PROTEIN_H
13 # include <BALL/KERNEL/protein.h>
14 #endif
15 
16 #ifndef BALL_STRUCTURE_PEPTIDES_H
17 # include <BALL/STRUCTURE/peptides.h>
18 #endif
19 
20 #include <vector>
21 
22 namespace BALL
23 {
114  : public CIFFile
115  {
116  public:
117 
118  // constant variables to denote unknown values
119  static const float FLOAT_VALUE_NA;
120  static const int INT_VALUE_NA;
121 
123 
129 
136  {
137  public:
139 
140  // saveframe name -- referenced in the sample_condition_label
141  // of the saveframe "assigned_chemical_shifts"
143  // Accoring to the NMRStarFile 2.1 documentation
144  // the first entry MUST BE "_Variable_type".
145  // This is why we are allowed to map per type :-)
146  vector<String> types;
150 
151  bool hasType(String type) {return values.has(type);}
152  std::ostream& operator >> (std::ostream& s);
153  };
154 
159  {
160  public:
161 
167  {
168  public:
170  void clear();
171 
178 
179  std::ostream& operator >> (std::ostream& s);
180  };
181 
183  void clear();
184 
188  vector <Component> components;
189 
190  std::ostream& operator >> (std::ostream& s);
191  };
192 
199  {
200  public:
202 
208  float shift_value;
212 
213  std::ostream& operator >> (std::ostream& s);
214  };
215 
222  {
223  public:
225 
226  // The saveframe's name = set name
227  // can be referenced in the saveframe "assigned_chemical_shifts"
229  std::vector<ShiftReferenceElement> elements;
230 
231  std::ostream& operator >> (std::ostream& s);
232  };
233 
240  {
241  public:
243 
248  char atom_type;
249  float shift_value;
250  float error_value;
252 
253  bool operator == (const NMRAtomData& atom) const;
254  std::ostream& operator >> (std::ostream& s);
255  };
256 
257 
267  class BALL_EXPORT NMRAtomDataSet // _Saveframe_category assigned_chemical_shifts
268 
269  {
270  public:
272 
275  std::vector<NMRAtomData> atom_data;
278  std::vector<String> samples;
279 
280  std::ostream& operator >> (std::ostream& s);
281 
282  protected:
284  };
285 
292  {
293  public:
296 
297  std::ostream& operator >> (std::ostream& s);
298  void clear();
299 
305 
306  };
307 
313  {
314  public:
317  {
318  public:
320 
321  std::ostream& operator >> (std::ostream& s);
322  void clear();
323 
332  };
333 
334 
336 
344  // polymer residue sequence information
347  // we want to allow things like resid 137A, so we cannot use Index
348  // key: index -- value: aminoacidname
350  vector<HomologDB> homolog_database_entries;
351 
352  std::ostream& operator >> (std::ostream& s);
353  void clear();
354  };
355 
356 
362  {
363  // System related information
364  public:
366  {
367  public:
369 
370  std::ostream& operator >> (std::ostream& s);
371  void clear();
372 
378  };
379 
380 
381  // Central class for convenience
383  {
384  public:
386  std::ostream& operator >> (std::ostream& s);
387  void clear();
388 
393  };
394 
395 
398 
399  ChemicalUnit const& getChemicalUnit(Position i) const { return chemical_units[i]; }
400  ChemicalUnit& getChemicalUnit(Position i) { return chemical_units[i]; }
401 
402  Size getNumberOfChemicalUnits() const {return chemical_units.size(); }
403 
404  // Name of the molecular system
407  vector<ChemicalUnit> chemical_units;
414  // related entries in various DB's
415  vector<RelatedDB> related_database_entries;
416 
418 
419  std::ostream& operator >> (std::ostream& s);
420  void clear();
421  };
422 
423 
429  {
430  public:
435 
436  std::ostream& operator >> (std::ostream& s);
437  };
438 
439 
446  {
447  public:
448 
455  //<saveframe_id, atom_id_in_nmr_atom_data_set>
456  typedef std::pair<Position, Position> BMRBIndex;
457  typedef std::map<Atom const* , BMRBIndex> BALLToBMRBMapping;
458  typedef std::map<const NMRAtomData*, Atom const*> BMRBToBALLMapping;
459  //TODO: Dont use pointer but something more sophisticated!
460 
462 
467 
474  BALLToBMRBMapper(Chain const& chain, const NMRStarFile& nmr_data, const String& chemical_unit);
475 
477  virtual ~BALLToBMRBMapper() {}
478 
480 
483 
485  const Chain* getChain() const {return chain_;}
486 
488  void setChain(Chain const& chain) { chain_ = &chain;
489  num_mismatches_ = -1;
490  num_gaps_ = -1;}
491 
493  void setNMRStarFile(NMRStarFile const& nmrfile) {nmr_data_ = &nmrfile;
494  num_mismatches_ = -1;
495  num_gaps_ = -1;}
496 
498  const NMRStarFile* getNMRStarFile() const {return nmr_data_;}
499 
501  void setNMRAtomDataSet(NMRAtomDataSet const& nmr_atom_data_set){nmr_atom_data_set_= &nmr_atom_data_set;}
502 
504  bool setNMRAtomDataSetByName(String const& chemical_unit_name);
505 
506  // Get the NMRAtomDataSet
507  const NMRAtomDataSet* getNMRAtomDataSet() const{return nmr_atom_data_set_;}
508 
510  BALLToBMRBMapping& getBALLToBMRBMapping() {return ball_to_bmrb_map_;}
511 
513  const BALLToBMRBMapping& getBALLToBMRBMapping() const {return ball_to_bmrb_map_;}
514 
516  BMRBToBALLMapping& getBMRBToBALLMapping() {return bmrb_to_ball_map_;}
517 
519  const BMRBToBALLMapping& getBMRBToBALLMapping() const {return bmrb_to_ball_map_;}
520 
522  int getNumberOfMismatches(){return num_mismatches_;}
523 
525  int getNumberOfGaps(){return num_gaps_;}
526 
528  bool isMapped(const NMRAtomData& nmr_atom) const;
529 
535  const Atom* getBALLAtom(const NMRAtomData& nmr_atom) const;
536 
541  bool isMapped(Atom const* atom) const;
542 
544  BMRBIndex operator () (const Atom* atom);
545 
553 
563  bool createMapping(const String& aligned_ball_sequence,
564  const String& aligned_nmrstar_sequence);
565 
568  void clear();
569 
571 
572  protected:
573 
575 
579 
582 
585 
586  // NOTE: do *not* attempt to delete these pointers!
587  const Chain* chain_;
593  bool valid_;
595 
596  private:
597  const Atom* findNMRAtom_(const NMRAtomData& atom) const;
598 
599  };
600 
602 
605 
609 
614  NMRStarFile(const String& file_name, File::OpenMode open_mode = std::ios::in);
615 
619 
620 
624 
628  bool read();
629 
630  /* Read an NMRStarFile and assign the shifts to the
631  given AtomContainer using a trivial standard mapping.
632  If the AtomContainer is a system, the first chain in chosen.
633 
634  @param ac AtomContainer to which the NMRStarfile's shift should be assigned.
635  @return bool - <tt>true</tt> if reading the file was successful
636  */
637  //TODO to be able to use this function, further functions getMapping() and assign() are needed.
638  bool read(AtomContainer& ac);
639 
646  bool assignShifts(BALLToBMRBMapper& ball_to_bmrb_mapping);
647 
660  const String& chemical_unit,
661  const String& aligned_ball_sequence,
662  const String& aligned_nmrstar_sequence);
663 
667 
670  Size getNumberOfShiftsAssigned() const {return number_of_assigned_shifts_;};
671 
674  const std::vector<NMRAtomDataSet>& getNMRData() const;
675 
678  const EntryInformation& getEntryInformation() const {return entry_information_;};
679 
682  const MolecularSystem& getMolecularInformation() const {return molecular_system_;};
683 
686  MolecularSystem& getMolecularInformation() {return molecular_system_;};
687 
688 
692 
696 
697 
701 
704  bool hasSampleCondition(String name) const;
705 
709 
713 
715  SampleCondition& getSampleCondition(Position i) {return sample_conditions_[i];};
716 
718  const SampleCondition& getSampleCondition(Position i) const {return sample_conditions_[i];};
719 
721  Size getNumberOfSampleConditions() const {return sample_conditions_.size();};
722 
724  const std::vector<SampleCondition>& getSampleConditions() const {return sample_conditions_;};
725 
727  std::vector<SampleCondition>& getSampleConditions() {return sample_conditions_;};
728 
729  // addSampleCondition TODO!!
730 
732  std::vector<Sample> getSamples() const {return samples_;};
733  //const std::vector<Sample>& getSamples() const {return samples_;};
734 
736  Size getNumberOfSamples() const {return samples_.size();};
737 
739  bool hasSample(String label) const;
740 
745 
749  Sample getSample(String label) const;
750 
752  std::vector<ShiftReferenceSet>& getShiftReferenceSets() {return shift_references_;};
754  const std::vector<ShiftReferenceSet>& getShiftReferenceSets() const {return shift_references_;};
755 
757  Size getNumberOfShiftReferenceSets() const {return shift_references_.size();};
758 
761 
763  ShiftReferenceSet& getShiftReferenceSet(Position i) {return shift_references_[i];};
765  const ShiftReferenceSet& getShiftReferenceSet(Position i) const {return shift_references_[i];};
766 
771 
772 
774  std::vector<NMRSpectrometer>& getNMRSpectrometers() {return nmr_spectrometers_;};
776  const std::vector<NMRSpectrometer>& getNMRSpectrometers() const {return nmr_spectrometers_;};
777 
779  Size getNumberOfNMRSpectrometers() const {return nmr_spectrometers_.size();};
780 
785 
790 
793 
796 
797 
802 
807 
812 
817 
819  Size getNumberOfMonomericPolymers() const {return monomeric_polymers_.size();};
820 
822  vector<MonomericPolymer> getMonomericPolymers() const {return monomeric_polymers_;};
823 
825  bool hasMonomericPolymer(String name) const;
826 
832  bool isMonomericPolymer(String chemical_unit_label);
833 
837  //TODO: Store changes/additions as Saveframes also in CIFFile
839 
840 
850 
852  bool hasHshifts() const {return has_H_shifts_;};
853 
855  bool hasCshifts() const {return has_C_shifts_;};
856 
858  bool hasNshifts() const {return has_N_shifts_;};
859 
861 
862 
866 
870  bool operator == (const NMRStarFile& f) const;
871 
875  bool operator != (const NMRStarFile& f) const;
876 
879  void clear();
880 
882 
883  private:
884 
885  /*_ @name NMRStar file specific Help-Methods
886  */
887  //_@{
888 
890  void readEntryInformation_();
891 
893  void readMolSystem_();
894 
896  void readMonomericPolymers_();
897 
899  void readSampleConditions_();
900 
902  void readShiftReferences_();
903 
905  void readShifts_();
906 
908  void readSamples_();
909 
911  void readNMRSpectrometer_();
912 
914  void findDependiencies_();
915 
917  void setSpecialCharacters_(String characters);
918 
920  bool isValidSingleValue_(String value);
921 
923  float valueToFloat_(String value);
924 
926  int valueToInt_(String value);
932  bool assignShifts_(BALLToBMRBMapper& pdb_to_bmrb_mapping);
933 
934  //_@}
935  /*_ @name NMRStar file specific attributes
936  */
937  //_@{
938 
939  /*_ A flag indicating validity of this instance. A sole NMRStarFile
940  instance cannot be valid, because it does not have any information.
941  */
942  bool valid_;
943 
945  Size number_of_shift_sets_;
946 
948  Size number_of_assigned_shifts_;
949 
951  EntryInformation entry_information_;
952 
954  MolecularSystem molecular_system_;
955 
957  std::vector<NMRAtomDataSet> atom_data_sets_;
958 
960  std::vector<SampleCondition> sample_conditions_;
961 
963  std::vector<Sample> samples_;
964 
966  std::vector<ShiftReferenceSet> shift_references_;
967 
969  std::vector<NMRSpectrometer> nmr_spectrometers_;
970 
972  vector<MonomericPolymer> monomeric_polymers_;
973 
975  bool has_H_shifts_;
976  bool has_C_shifts_;
977  bool has_N_shifts_;
978 
979  // a dummy saveframe
980  SaveFrame dummy_saveframe_;
981 
982  // a dummy sample condition
983  SampleCondition dummy_sample_condition_;
984 
985  // a dummy sample
986  Sample dummy_sample_;
987 
988  // a dummy shift reference set
989  ShiftReferenceSet dummy_shift_reference_set_;
990 
991  // a dummy nmr spectrometer
992  NMRSpectrometer dummy_NMR_spectrometer_;
993 
994  // a dummy nmr spectrometer
995  MonomericPolymer dummy_monomeric_polymer_;
996 
998  String special_characters_;
999  //_@}
1000  };
1001 
1003 } // Namespace BALL
1004 
1005 #endif // BALL_FORMAT_NMRSTARFILE_H
BALL::NMRStarFile::BALLToBMRBMapper::createTrivialMapping
bool createTrivialMapping()
BALL::NMRStarFile::getNumberOfAtoms
Size getNumberOfAtoms() const
BALL::NMRStarFile::NMRAtomDataSet::NMRAtomDataSet
NMRAtomDataSet(NMRStarFile *parent)
BALL::NMRStarFile::hasSample
bool hasSample(String label) const
Return true if the file contains a sample named label, false otherwise.
BALL::NMRStarFile::MolecularSystem::getChemicalUnit
ChemicalUnit & getChemicalUnit(Position i)
Definition: NMRStarFile.h:400
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::NMRStarFile::Sample::Component::label
String label
Definition: NMRStarFile.h:172
BALL::NMRStarFile::BALLToBMRBMapper::createMapping
bool createMapping(const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapper
BALLToBMRBMapper()
BALL::NMRStarFile::SampleCondition::values
StringHashMap< float > values
Definition: NMRStarFile.h:147
BALL::NMRStarFile::assignShifts
bool assignShifts(AtomContainer &ac, const String &chemical_unit, const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
BALL::NMRStarFile::hasHshifts
bool hasHshifts() const
Check, whether this NMRFile provides hydrogen shifts.
Definition: NMRStarFile.h:852
BALL::Chain
Definition: chain.h:32
BALL::NMRStarFile::EntryInformation::entry_type
String entry_type
Definition: NMRStarFile.h:300
BALL::NMRStarFile::getNumberOfShiftReferenceSets
Size getNumberOfShiftReferenceSets() const
Get the number of shift reference sets.
Definition: NMRStarFile.h:757
BALL::NMRStarFile::EntryInformation::experimental_method
String experimental_method
Definition: NMRStarFile.h:303
BALL::NMRStarFile::BALLToBMRBMapper::valid_
bool valid_
Definition: NMRStarFile.h:593
BALL::NMRStarFile::Sample::Component::clear
void clear()
BALL::NMRStarFile::BALLToBMRBMapper::clear
void clear()
BALL::NMRStarFile::Sample::Component::concentration_max
float concentration_max
Definition: NMRStarFile.h:176
BALL::NMRStarFile::getNMRSpectrometers
const std::vector< NMRSpectrometer > & getNMRSpectrometers() const
Get the spectrometers.
Definition: NMRStarFile.h:776
BALL::NMRStarFile::BALLToBMRBMapper::getNMRStarFile
const NMRStarFile * getNMRStarFile() const
Get the NMRStar file.
Definition: NMRStarFile.h:498
BALL::NMRStarFile::BALLToBMRBMapper::setNMRStarFile
void setNMRStarFile(NMRStarFile const &nmrfile)
Set the NMRStar file.
Definition: NMRStarFile.h:493
BALL::NMRStarFile::MonomericPolymer::molecular_mass
float molecular_mass
Definition: NMRStarFile.h:342
BALL::NMRStarFile::BALLToBMRBMapper::getNumberOfMismatches
int getNumberOfMismatches()
Return the number of mismatches in the current mapping.
Definition: NMRStarFile.h:522
BALL::NMRStarFile::MolecularSystem
Definition: NMRStarFile.h:362
BALL::NMRStarFile::BALLToBMRBMapper::name_converter_
Peptides::NameConverter name_converter_
Definition: NMRStarFile.h:574
BALL::NMRStarFile::MonomericPolymer::name_variant
String name_variant
Definition: NMRStarFile.h:341
BALL::NMRStarFile::MonomericPolymer::HomologDB::accession_code
String accession_code
Definition: NMRStarFile.h:325
BALL::NMRStarFile::MolecularSystem::RelatedDB::relation_type
String relation_type
Definition: NMRStarFile.h:376
BALL::NMRStarFile::ShiftReferenceElement::ShiftReferenceElement
ShiftReferenceElement()
BALL::NMRStarFile::MonomericPolymer::HomologDB::name
String name
Definition: NMRStarFile.h:324
BALL::NMRStarFile::read
bool read(AtomContainer &ac)
BALL::NMRStarFile::BALLToBMRBMapper::getBMRBToBALLMapping
const BMRBToBALLMapping & getBMRBToBALLMapping() const
Return the mapping
Definition: NMRStarFile.h:519
BALL::operator!=
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
BALL::NMRStarFile::getMonomericPolymers
vector< MonomericPolymer > getMonomericPolymers() const
Get all Monomeric Polymers.
Definition: NMRStarFile.h:822
BALL::NMRStarFile::NMRAtomDataSet
Definition: NMRStarFile.h:269
BALL::NMRStarFile::NMRAtomDataSet::label
String label
Definition: NMRStarFile.h:274
BALL::NMRStarFile::BALLToBMRBMapper
Definition: NMRStarFile.h:446
BALL::AtomContainer
Definition: atomContainer.h:32
BALL::NMRStarFile::EntryInformation::EntryInformation
EntryInformation()
BALL::NMRStarFile::ShiftReferenceElement
Definition: NMRStarFile.h:199
BALL::NMRStarFile::MonomericPolymer::HomologDB::entry_mol_name
String entry_mol_name
Definition: NMRStarFile.h:326
BALL::NMRStarFile::getMonomericPolymer
const NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i) const
BALL::NMRStarFile::MonomericPolymer::clear
void clear()
CIFFile.h
BALL::NMRStarFile::MonomericPolymer::HomologDB::subject_length
float subject_length
Definition: NMRStarFile.h:328
BALL::NMRStarFile::NMRSpectrometer::model
String model
Definition: NMRStarFile.h:433
BALL::NMRStarFile::SampleCondition::types
vector< String > types
Definition: NMRStarFile.h:146
BALL::NMRStarFile::MonomericPolymer::homolog_database_entries
vector< HomologDB > homolog_database_entries
Definition: NMRStarFile.h:350
BALL::NMRStarFile::ShiftReferenceSet::name
String name
Definition: NMRStarFile.h:228
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::label
String label
Definition: NMRStarFile.h:390
BALL::NMRStarFile::BALLToBMRBMapper::nmr_atom_data_set_index_
Position nmr_atom_data_set_index_
Definition: NMRStarFile.h:590
BALL::NMRStarFile::MolecularSystem::ChemicalUnit
Definition: NMRStarFile.h:383
BALL::NMRStarFile::BALLToBMRBMapper::bmrb_to_ball_map_
BMRBToBALLMapping bmrb_to_ball_map_
map NMR atom data to BALL atoms
Definition: NMRStarFile.h:584
BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapper
BALLToBMRBMapper(Chain const &chain, const NMRStarFile &nmr_data, const String &chemical_unit)
BALL::NMRStarFile::MolecularSystem::getNumberOfChemicalUnits
Size getNumberOfChemicalUnits() const
Definition: NMRStarFile.h:402
BALL::NMRStarFile::MolecularSystem::RelatedDB::accession_code
String accession_code
Definition: NMRStarFile.h:374
BALL::Atom
Definition: atom.h:90
BALL::NMRStarFile::POSITION_VALUE_NA
static const Position POSITION_VALUE_NA
Definition: NMRStarFile.h:122
BALL::NMRStarFile::Sample
Definition: NMRStarFile.h:159
BALL::NMRStarFile::ShiftReferenceElement::shift_units
String shift_units
Definition: NMRStarFile.h:207
BALL::NMRStarFile::getMolecularInformation
const MolecularSystem & getMolecularInformation() const
Definition: NMRStarFile.h:682
BALL::NMRStarFile::INT_VALUE_NA
static const int INT_VALUE_NA
Definition: NMRStarFile.h:120
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::shifts
NMRAtomDataSet * shifts
Definition: NMRStarFile.h:392
BALL::NMRStarFile::getSampleCondition
SampleCondition & getSampleCondition(Position i)
Get the i-th SampleCondition.
Definition: NMRStarFile.h:715
BALL::NMRStarFile::MonomericPolymer::HomologDB
Database with homolog entries.
Definition: NMRStarFile.h:317
BALL::NMRStarFile::Sample::type
String type
Definition: NMRStarFile.h:186
BALL::NMRStarFile::MonomericPolymer::details
String details
Definition: NMRStarFile.h:343
BALL::NMRStarFile::getNumberOfNMRSpectrometers
Size getNumberOfNMRSpectrometers() const
Get the number of nmr spectrometers.
Definition: NMRStarFile.h:779
BALL::NMRStarFile::MolecularSystem::MolecularSystem
MolecularSystem()
BALL::NMRStarFile::MonomericPolymer::HomologDB::seq_to_submitted_percentage
float seq_to_submitted_percentage
Definition: NMRStarFile.h:327
BALL::NMRStarFile::EntryInformation::BMRB_accession_code
String BMRB_accession_code
Definition: NMRStarFile.h:301
BALL::NMRStarFile::getNMRSpectrometers
std::vector< NMRSpectrometer > & getNMRSpectrometers()
Get the spectrometers.
Definition: NMRStarFile.h:774
BALL::NMRStarFile::MolecularSystem::system_oligomer_state
String system_oligomer_state
Definition: NMRStarFile.h:409
BALL::NMRStarFile::NMRAtomData::residue_label
String residue_label
Definition: NMRStarFile.h:246
BALL::NMRStarFile::BALLToBMRBMapper::nmr_atom_data_set_
const NMRAtomDataSet * nmr_atom_data_set_
Definition: NMRStarFile.h:589
BALL::NMRStarFile::ShiftReferenceSet::elements
std::vector< ShiftReferenceElement > elements
Definition: NMRStarFile.h:229
BALL::NMRStarFile::MolecularSystem::RelatedDB::details
String details
Definition: NMRStarFile.h:377
BALL::NMRStarFile::getNMRSpectrometer
NMRSpectrometer & getNMRSpectrometer(Position i)
Get the i-th spectrometer.
BALL::NMRStarFile::getSampleConditionByName
SampleCondition & getSampleConditionByName(String name)
BALL::NMRStarFile::NMRAtomDataSet::atom_data
std::vector< NMRAtomData > atom_data
Definition: NMRStarFile.h:275
BALL::NMRStarFile::Sample::Component::concentration_value
float concentration_value
Definition: NMRStarFile.h:173
BALL::NMRStarFile::getShiftReferenceSet
ShiftReferenceSet & getShiftReferenceSet(Position i)
Get the i-th shift reference set.
Definition: NMRStarFile.h:763
BALL::String
Definition: string.h:57
BALL::NMRStarFile::Sample::details
String details
Definition: NMRStarFile.h:187
BALL::NMRStarFile::NMRAtomData::NMRAtomData
NMRAtomData()
BALL::Peptides::NameConverter
This class provides conversion of atom names between naming schemata.
Definition: peptides.h:152
BALL::NMRStarFile::MolecularSystem::system_paramagnetic
String system_paramagnetic
Definition: NMRStarFile.h:410
BALL::NMRStarFile::Sample::clear
void clear()
BALL::NMRStarFile::Sample::label
String label
Definition: NMRStarFile.h:185
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::clear
void clear()
BALL::NMRStarFile::getChemicalUnitByLabel
MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label)
BALL::NMRStarFile::BALLToBMRBMapper::chain_
const Chain * chain_
Definition: NMRStarFile.h:587
BALL::NMRStarFile::NMRAtomData::atom_type
char atom_type
Definition: NMRStarFile.h:248
BALL::NMRStarFile::BALLToBMRBMapper::getNMRAtomDataSet
const NMRAtomDataSet * getNMRAtomDataSet() const
Definition: NMRStarFile.h:507
BALL::NMRStarFile::Sample::Sample
Sample()
BALL::NMRStarFile::hasCshifts
bool hasCshifts() const
Check, whether this NMRFile provides carbon shifts.
Definition: NMRStarFile.h:855
BALL
Definition: constants.h:13
BALL::NMRStarFile::Sample::Component::Component
Component()
BALL::NMRStarFile::NMRStarFile
NMRStarFile(const String &file_name, File::OpenMode open_mode=std::ios::in)
BALL::NMRStarFile::getSampleCondition
const SampleCondition & getSampleCondition(Position i) const
Get the i-th SampleCondition.
Definition: NMRStarFile.h:718
BALL::NMRStarFile::MolecularSystem::chemical_units
vector< ChemicalUnit > chemical_units
Definition: NMRStarFile.h:407
BALL::NMRStarFile::getNMRSpectrometer
const NMRSpectrometer & getNMRSpectrometer(Position i) const
Get the i-th spectrometer.
BALL::NMRStarFile::NMRAtomData
Definition: NMRStarFile.h:240
BALL::NMRStarFile::getMolecularInformation
MolecularSystem & getMolecularInformation()
Definition: NMRStarFile.h:686
BALL::NMRStarFile::MonomericPolymer::MonomericPolymer
MonomericPolymer()
protein.h
BALL::NMRStarFile::BALLToBMRBMapper::getNumberOfGaps
int getNumberOfGaps()
Return the number of mismatches in the current mapping.
Definition: NMRStarFile.h:525
BALL::NMRStarFile::assignShifts
bool assignShifts(BALLToBMRBMapper &ball_to_bmrb_mapping)
BALL::NMRStarFile::MolecularSystem::related_database_entries
vector< RelatedDB > related_database_entries
Definition: NMRStarFile.h:415
BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapping
std::map< Atom const *, BMRBIndex > BALLToBMRBMapping
Definition: NMRStarFile.h:457
BALL::NMRStarFile::getShiftReferenceSets
std::vector< ShiftReferenceSet > & getShiftReferenceSets()
Get the shift reference sets.
Definition: NMRStarFile.h:752
BALL::NMRStarFile::MonomericPolymer::HomologDB::homology_expectation_value
float homology_expectation_value
Definition: NMRStarFile.h:331
BALL::NMRStarFile::Sample::Component::isotopic_labeling
String isotopic_labeling
Definition: NMRStarFile.h:177
BALL::NMRStarFile::MolecularSystem::system_name
String system_name
Definition: NMRStarFile.h:405
BALL::NMRStarFile::MonomericPolymer::number_of_residues
int number_of_residues
Definition: NMRStarFile.h:345
BALL::NMRStarFile::~NMRStarFile
~NMRStarFile()
Destructor.
BALL::NMRStarFile::getEntryInformation
const EntryInformation & getEntryInformation() const
Definition: NMRStarFile.h:678
BALL::NMRStarFile::NMRSpectrometer::manufacturer
String manufacturer
Definition: NMRStarFile.h:432
BALL::NMRStarFile::getNMRSpectrometerManufacturer
String getNMRSpectrometerManufacturer(Position i) const
Get the spectrometer manufacturer.
BALL::NMRStarFile::BALLToBMRBMapper::num_gaps_
int num_gaps_
Definition: NMRStarFile.h:592
BALL::NMRStarFile::MonomericPolymer::polymer_class
String polymer_class
Definition: NMRStarFile.h:339
BALL::NMRStarFile::getShiftReferenceSetByName
const ShiftReferenceSet & getShiftReferenceSetByName(String name) const
Get a ShiftReferenceSet by its SaveFrame name.
BALL::NMRStarFile::BALLToBMRBMapper::setNMRAtomDataSetByName
bool setNMRAtomDataSetByName(String const &chemical_unit_name)
Set the NMRAtomDataSet by chemical unit name.
BALL::NMRStarFile::EntryInformation::clear
void clear()
BALL::NMRStarFile::MolecularSystem::getChemicalUnit
ChemicalUnit const & getChemicalUnit(Position i) const
Definition: NMRStarFile.h:399
BALL::NMRStarFile::BALLToBMRBMapper::isMapped
bool isMapped(Atom const *atom) const
BALL::NMRStarFile::ShiftReferenceElement::shift_value
float shift_value
Definition: NMRStarFile.h:208
BALL::NMRStarFile::getMonomericPolymer
const NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name) const
BALL::NMRStarFile::addMonomericPolymer
void addMonomericPolymer(MonomericPolymer mp)
BALL::NMRStarFile::getChemicalUnitByLabel
const MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label) const
BALL::File::OpenMode
std::ios::openmode OpenMode
Definition: file.h:165
BALL::NMRStarFile::ShiftReferenceElement::mol_common_name
String mol_common_name
Definition: NMRStarFile.h:203
BALL::NMRStarFile::BALLToBMRBMapper::ball_to_bmrb_map_
BALLToBMRBMapping ball_to_bmrb_map_
map BALL atoms to NMR atom data
Definition: NMRStarFile.h:581
BALL::StringHashMap< float >
BALL::NMRStarFile::Sample::components
vector< Component > components
Definition: NMRStarFile.h:188
BALL::NMRStarFile::SampleCondition
Definition: NMRStarFile.h:136
BALL::NMRStarFile::SampleCondition::errors
StringHashMap< float > errors
Definition: NMRStarFile.h:148
BALL_SIZE_TYPE
BALL::NMRStarFile::BALLToBMRBMapper::setChain
void setChain(Chain const &chain)
Set the chain.
Definition: NMRStarFile.h:488
BALL::NMRStarFile::MolecularSystem::system_molecular_weight
float system_molecular_weight
The systems molecular weigth in dalton.
Definition: NMRStarFile.h:413
BALL::NMRStarFile::EntryInformation
Definition: NMRStarFile.h:292
BALL::NMRStarFile::getNumberOfMonomericPolymers
Size getNumberOfMonomericPolymers() const
Get the number of monomeric polymers in the file.
Definition: NMRStarFile.h:819
BALL::NMRStarFile::MolecularSystem::RelatedDB::clear
void clear()
BALL::NMRStarFile::EntryInformation::submission_date
String submission_date
Definition: NMRStarFile.h:304
BALL::NMRStarFile::MonomericPolymer::residues_by_index
StringHashMap< String > residues_by_index
Definition: NMRStarFile.h:349
BALL::NMRStarFile::ShiftReferenceSet
Definition: NMRStarFile.h:222
BALL::NMRStarFile::NMRAtomData::error_value
float error_value
Definition: NMRStarFile.h:250
BALL::NMRStarFile::NMRSpectrometer::name
String name
Definition: NMRStarFile.h:431
BALL::NMRStarFile::SampleCondition::name
String name
Definition: NMRStarFile.h:142
BALL::NMRStarFile::SampleCondition::SampleCondition
SampleCondition()
BALL::NMRStarFile::getSamples
std::vector< Sample > getSamples() const
Get the samples.
Definition: NMRStarFile.h:732
BALL::NMRStarFile::MonomericPolymer::residue_sequence
String residue_sequence
Definition: NMRStarFile.h:346
BALL::NMRStarFile::MolecularSystem::system_thiol_state
String system_thiol_state
Definition: NMRStarFile.h:411
BALL::NMRStarFile::getShiftReferenceSetByName
ShiftReferenceSet & getShiftReferenceSetByName(String name)
Get a ShiftReferenceSet by its SaveFrame name.
BALL::NMRStarFile::getSampleConditions
std::vector< SampleCondition > & getSampleConditions()
Get the sample conditions.
Definition: NMRStarFile.h:727
BALL::NMRStarFile::MonomericPolymer::HomologDB::clear
void clear()
BALL::NMRStarFile::ShiftReferenceElement::reference_method
String reference_method
Definition: NMRStarFile.h:209
BALL::NMRStarFile::EntryInformation::~EntryInformation
~EntryInformation()
BALL::NMRStarFile::EntryInformation::NMR_STAR_version
String NMR_STAR_version
Definition: NMRStarFile.h:302
BALL::NMRStarFile::getSampleConditions
const std::vector< SampleCondition > & getSampleConditions() const
Get the sample conditions.
Definition: NMRStarFile.h:724
BALL::NMRStarFile::BALLToBMRBMapper::getChain
const Chain * getChain() const
Get the chain.
Definition: NMRStarFile.h:485
BALL::StringHashMap::has
bool has(const String &key) const
Definition: stringHashMap.h:208
BALL::NMRStarFile::MonomericPolymer::type
String type
Definition: NMRStarFile.h:338
BALL::NMRStarFile::MolecularSystem::RelatedDB::entry_mol_name
String entry_mol_name
Definition: NMRStarFile.h:375
BALL::NMRStarFile::SampleCondition::hasType
bool hasType(String type)
Definition: NMRStarFile.h:151
BALL::NMRStarFile::NMRAtomData::residue_seq_code
Position residue_seq_code
Definition: NMRStarFile.h:245
BALL::NMRStarFile::getSample
Sample getSample(Position i) const
BALL::NMRStarFile::MolecularSystem::system_physical_state
String system_physical_state
Definition: NMRStarFile.h:408
BALL::NMRStarFile::Sample::Component
Definition: NMRStarFile.h:167
BALL::NMRStarFile::getResidueSequence
String getResidueSequence(Position i=0) const
BALL::NMRStarFile::getNMRSpectrometerByName
const NMRSpectrometer & getNMRSpectrometerByName(String name) const
Get the spectrometer by its SaveFrame name.
BALL::NMRStarFile::BALLToBMRBMapper::setNMRAtomDataSet
void setNMRAtomDataSet(NMRAtomDataSet const &nmr_atom_data_set)
Set the NMRAtomDataSet.
Definition: NMRStarFile.h:501
BALL::NMRStarFile::BALLToBMRBMapper::getBALLToBMRBMapping
BALLToBMRBMapping & getBALLToBMRBMapping()
Return the mapping
Definition: NMRStarFile.h:510
BALL::NMRStarFile
This class provides methods for reading and assigning chemical shifts.
Definition: NMRStarFile.h:115
BALL::NMRStarFile::ShiftReferenceElement::indirect_shift_ratio
float indirect_shift_ratio
Definition: NMRStarFile.h:211
BALL::NMRStarFile::MonomericPolymer::common_name
String common_name
Definition: NMRStarFile.h:340
BALL::NMRStarFile::MonomericPolymer::label_name
String label_name
Definition: NMRStarFile.h:337
BALL::NMRStarFile::BALLToBMRBMapper::num_mismatches_
int num_mismatches_
Definition: NMRStarFile.h:591
BALL::NMRStarFile::ShiftReferenceElement::isotope_number
Position isotope_number
Definition: NMRStarFile.h:205
BALL::NMRStarFile::getNMRSpectrometerByName
NMRSpectrometer & getNMRSpectrometerByName(String name)
Get the spectrometer by its SaveFrame name.
BALL::NMRStarFile::ShiftReferenceElement::atom_group
String atom_group
Definition: NMRStarFile.h:206
BALL::NMRStarFile::hasNshifts
bool hasNshifts() const
Check, whether this NMRFile provides nitrogen shifts.
Definition: NMRStarFile.h:858
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::NMRStarFile::getNumberOfSampleConditions
Size getNumberOfSampleConditions() const
Get the number of sample conditions.
Definition: NMRStarFile.h:721
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::component_name
String component_name
Definition: NMRStarFile.h:389
BALL::NMRStarFile::clear
void clear()
BALL::NMRStarFile::hasShiftReferenceSet
bool hasShiftReferenceSet(String name)
Check if there is a ShiftReferenceSet named name.
BALL::NMRStarFile::NMRSpectrometer
Definition: NMRStarFile.h:429
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::monomeric_polymer
MonomericPolymer * monomeric_polymer
Definition: NMRStarFile.h:391
BALL::NMRStarFile::hasSampleCondition
bool hasSampleCondition(String name) const
BALL::NMRStarFile::getShiftReferenceSet
const ShiftReferenceSet & getShiftReferenceSet(Position i) const
Get the i-th shift reference set.
Definition: NMRStarFile.h:765
BALL::NMRStarFile::BALLToBMRBMapper::BMRBToBALLMapping
std::map< const NMRAtomData *, Atom const * > BMRBToBALLMapping
Definition: NMRStarFile.h:458
BALL::NMRStarFile::ShiftReferenceElement::reference_type
String reference_type
Definition: NMRStarFile.h:210
BALL::NMRStarFile::BALLToBMRBMapper::BMRBIndex
std::pair< Position, Position > BMRBIndex
Definition: NMRStarFile.h:456
BALL::NMRStarFile::getNMRData
const std::vector< NMRAtomDataSet > & getNMRData() const
BALL::NMRStarFile::getNumberOfShiftsAssigned
Size getNumberOfShiftsAssigned() const
Definition: NMRStarFile.h:670
BALL::NMRStarFile::MonomericPolymer::HomologDB::seq_positive
float seq_positive
Definition: NMRStarFile.h:330
BALL::NMRStarFile::BALLToBMRBMapper::nmr_data_
const NMRStarFile * nmr_data_
Definition: NMRStarFile.h:588
BALL::operator>>
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
Definition: regularData1D.h:802
BALL::NMRStarFile::hasMonomericPolymer
bool hasMonomericPolymer(String name) const
Check if polymer name is already stored is a monomeric polymer.
BALL::NMRStarFile::BALLToBMRBMapper::getBALLAtom
const Atom * getBALLAtom(const NMRAtomData &nmr_atom) const
BALL::NMRStarFile::BALLToBMRBMapper::getBALLToBMRBMapping
const BALLToBMRBMapping & getBALLToBMRBMapping() const
Return the mapping
Definition: NMRStarFile.h:513
BALL::NMRStarFile::NMRAtomData::atom_name
String atom_name
Definition: NMRStarFile.h:247
BALL::NMRStarFile::NMRAtomDataSet::samples
std::vector< String > samples
Definition: NMRStarFile.h:278
BALL::NMRStarFile::MolecularSystem::RelatedDB
Definition: NMRStarFile.h:366
BALL::NMRStarFile::ShiftReferenceSet::ShiftReferenceSet
ShiftReferenceSet()
BALL::NMRStarFile::NMRAtomDataSet::reference
String reference
Definition: NMRStarFile.h:277
BALL::CIFFile
Definition: CIFFile.h:34
BALL::NMRStarFile::MonomericPolymer::HomologDB::HomologDB
HomologDB()
BALL::NMRStarFile::MolecularSystem::RelatedDB::RelatedDB
RelatedDB()
BALL::NMRStarFile::NMRAtomData::atom_ID
Position atom_ID
Definition: NMRStarFile.h:244
BALL::NMRStarFile::MonomericPolymer
Definition: NMRStarFile.h:313
BALL::NMRStarFile::BALLToBMRBMapper::getBMRBToBALLMapping
BMRBToBALLMapping & getBMRBToBALLMapping()
Return the mapping
Definition: NMRStarFile.h:516
BALL::NMRStarFile::NMRAtomDataSet::name
String name
Definition: NMRStarFile.h:273
BALL::NMRStarFile::Sample::Component::value_unit
String value_unit
Definition: NMRStarFile.h:174
BALL::NMRStarFile::MolecularSystem::ChemicalUnit::ChemicalUnit
ChemicalUnit()
BALL::NMRStarFile::getNumberOfSamples
Size getNumberOfSamples() const
Get the number of samples.
Definition: NMRStarFile.h:736
BALL::NMRStarFile::getShiftReferenceSets
const std::vector< ShiftReferenceSet > & getShiftReferenceSets() const
Get the shift reference sets.
Definition: NMRStarFile.h:754
BALL::NMRStarFile::NMRStarFile
NMRStarFile()
BALL::NMRStarFile::getSampleConditionByName
const SampleCondition & getSampleConditionByName(String name) const
BALL::NMRStarFile::NMRAtomDataSet::condition
String condition
Definition: NMRStarFile.h:276
BALL::NMRStarFile::MolecularSystem::abbreviation_common
String abbreviation_common
Definition: NMRStarFile.h:406
BALL::NMRStarFile::MolecularSystem::clear
void clear()
BALL::NMRStarFile::FLOAT_VALUE_NA
static const float FLOAT_VALUE_NA
Definition: NMRStarFile.h:119
BALL::NMRStarFile::ShiftReferenceElement::atom_type
String atom_type
Definition: NMRStarFile.h:204
BALL::NMRStarFile::hasSampleCondition
bool hasSampleCondition(String name)
BALL::NMRStarFile::read
bool read()
BALL::NMRStarFile::MonomericPolymer::HomologDB::seq_identity
float seq_identity
Definition: NMRStarFile.h:329
BALL::NMRStarFile::MolecularSystem::RelatedDB::name
String name
Definition: NMRStarFile.h:373
BALL::NMRStarFile::getSample
Sample getSample(String label) const
BALL::NMRStarFile::Sample::Component::concentration_min
float concentration_min
Definition: NMRStarFile.h:175
peptides.h
BALL::NMRStarFile::BALLToBMRBMapper::~BALLToBMRBMapper
virtual ~BALLToBMRBMapper()
Destructor.
Definition: NMRStarFile.h:477
BALL::NMRStarFile::isMonomericPolymer
bool isMonomericPolymer(String chemical_unit_label)
BALL::NMRStarFile::NMRSpectrometer::field_strength
float field_strength
Definition: NMRStarFile.h:434
BALL::NMRStarFile::NMRAtomDataSet::parent_
NMRStarFile * parent_
Definition: NMRStarFile.h:283
BALL::NMRStarFile::NMRAtomData::ambiguity_code
Position ambiguity_code
Definition: NMRStarFile.h:251
BALL::NMRStarFile::getMonomericPolymer
NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i)
BALL::NMRStarFile::MolecularSystem::~MolecularSystem
~MolecularSystem()
BALL::NMRStarFile::SampleCondition::units
StringHashMap< String > units
Definition: NMRStarFile.h:149
BALL::NMRStarFile::getMonomericPolymer
NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name)
BALL::NMRStarFile::NMRAtomData::shift_value
float shift_value
Definition: NMRStarFile.h:249
BALL::NMRStarFile::BALLToBMRBMapper::isMapped
bool isMapped(const NMRAtomData &nmr_atom) const
Test whether the given nmr atom data is mapped to a structure atom.
BALL::NMRStarFile::getNMRSpectrometerFieldStrength
float getNMRSpectrometerFieldStrength(Position i) const
Get the spectrometer field strength.