5#ifndef BALL_FORMAT_NMRSTARFILE_H
6#define BALL_FORMAT_NMRSTARFILE_H
8#ifndef BALL_FORMAT_CIFFILE_H
12#ifndef BALL_KERNEL_PROTEIN_H
16#ifndef BALL_STRUCTURE_PEPTIDES_H
489 num_mismatches_ = -1;
494 num_mismatches_ = -1;
564 const String& aligned_nmrstar_sequence);
660 const String& chemical_unit,
661 const String& aligned_ball_sequence,
662 const String& aligned_nmrstar_sequence);
890 void readEntryInformation_();
893 void readMolSystem_();
896 void readMonomericPolymers_();
899 void readSampleConditions_();
902 void readShiftReferences_();
911 void readNMRSpectrometer_();
914 void findDependiencies_();
917 void setSpecialCharacters_(
String characters);
920 bool isValidSingleValue_(
String value);
923 float valueToFloat_(
String value);
926 int valueToInt_(
String value);
945 Size number_of_shift_sets_;
948 Size number_of_assigned_shifts_;
957 std::vector<NMRAtomDataSet> atom_data_sets_;
960 std::vector<SampleCondition> sample_conditions_;
963 std::vector<Sample> samples_;
966 std::vector<ShiftReferenceSet> shift_references_;
969 std::vector<NMRSpectrometer> nmr_spectrometers_;
972 vector<MonomericPolymer> monomeric_polymers_;
998 String special_characters_;
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
bool has(const String &key) const
This class provides methods for reading and assigning chemical shifts.
void addMonomericPolymer(MonomericPolymer mp)
NMRSpectrometer & getNMRSpectrometerByName(String name)
Get the spectrometer by its SaveFrame name.
bool hasSampleCondition(String name)
SampleCondition & getSampleConditionByName(String name)
MolecularSystem & getMolecularInformation()
ShiftReferenceSet & getShiftReferenceSet(Position i)
Get the i-th shift reference set.
SampleCondition & getSampleCondition(Position i)
Get the i-th SampleCondition.
const std::vector< NMRSpectrometer > & getNMRSpectrometers() const
Get the spectrometers.
Size getNumberOfNMRSpectrometers() const
Get the number of nmr spectrometers.
Size getNumberOfShiftsAssigned() const
Size getNumberOfMonomericPolymers() const
Get the number of monomeric polymers in the file.
const ShiftReferenceSet & getShiftReferenceSet(Position i) const
Get the i-th shift reference set.
const NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name) const
String getResidueSequence(Position i=0) const
String getNMRSpectrometerManufacturer(Position i) const
Get the spectrometer manufacturer.
const std::vector< SampleCondition > & getSampleConditions() const
Get the sample conditions.
bool hasCshifts() const
Check, whether this NMRFile provides carbon shifts.
Sample getSample(String label) const
static const float FLOAT_VALUE_NA
MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label)
bool hasNshifts() const
Check, whether this NMRFile provides nitrogen shifts.
NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i)
bool hasSampleCondition(String name) const
const SampleCondition & getSampleConditionByName(String name) const
const std::vector< NMRAtomDataSet > & getNMRData() const
const NMRSpectrometer & getNMRSpectrometer(Position i) const
Get the i-th spectrometer.
const MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label) const
bool hasShiftReferenceSet(String name)
Check if there is a ShiftReferenceSet named name.
bool assignShifts(BALLToBMRBMapper &ball_to_bmrb_mapping)
bool hasMonomericPolymer(String name) const
Check if polymer name is already stored is a monomeric polymer.
Size getNumberOfAtoms() const
const NMRSpectrometer & getNMRSpectrometerByName(String name) const
Get the spectrometer by its SaveFrame name.
bool hasSample(String label) const
Return true if the file contains a sample named label, false otherwise.
bool isMonomericPolymer(String chemical_unit_label)
vector< MonomericPolymer > getMonomericPolymers() const
Get all Monomeric Polymers.
NMRStarFile(const String &file_name, File::OpenMode open_mode=std::ios::in)
bool assignShifts(AtomContainer &ac, const String &chemical_unit, const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
std::vector< ShiftReferenceSet > & getShiftReferenceSets()
Get the shift reference sets.
static const Position POSITION_VALUE_NA
NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name)
std::vector< SampleCondition > & getSampleConditions()
Get the sample conditions.
std::vector< NMRSpectrometer > & getNMRSpectrometers()
Get the spectrometers.
Size getNumberOfSampleConditions() const
Get the number of sample conditions.
const SampleCondition & getSampleCondition(Position i) const
Get the i-th SampleCondition.
NMRSpectrometer & getNMRSpectrometer(Position i)
Get the i-th spectrometer.
static const int INT_VALUE_NA
Sample getSample(Position i) const
bool hasHshifts() const
Check, whether this NMRFile provides hydrogen shifts.
float getNMRSpectrometerFieldStrength(Position i) const
Get the spectrometer field strength.
Size getNumberOfShiftReferenceSets() const
Get the number of shift reference sets.
bool read(AtomContainer &ac)
ShiftReferenceSet & getShiftReferenceSetByName(String name)
Get a ShiftReferenceSet by its SaveFrame name.
const NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i) const
std::vector< Sample > getSamples() const
Get the samples.
Size getNumberOfSamples() const
Get the number of samples.
const ShiftReferenceSet & getShiftReferenceSetByName(String name) const
Get a ShiftReferenceSet by its SaveFrame name.
~NMRStarFile()
Destructor.
const MolecularSystem & getMolecularInformation() const
const EntryInformation & getEntryInformation() const
const std::vector< ShiftReferenceSet > & getShiftReferenceSets() const
Get the shift reference sets.
StringHashMap< String > units
StringHashMap< float > errors
bool hasType(String type)
StringHashMap< float > values
vector< Component > components
float concentration_value
float indirect_shift_ratio
std::vector< ShiftReferenceElement > elements
Position residue_seq_code
std::vector< NMRAtomData > atom_data
std::vector< String > samples
NMRAtomDataSet(NMRStarFile *parent)
String BMRB_accession_code
String experimental_method
StringHashMap< String > residues_by_index
vector< HomologDB > homolog_database_entries
Database with homolog entries.
float seq_to_submitted_percentage
float homology_expectation_value
ChemicalUnit const & getChemicalUnit(Position i) const
String system_oligomer_state
String system_thiol_state
String abbreviation_common
Size getNumberOfChemicalUnits() const
String system_physical_state
vector< ChemicalUnit > chemical_units
String system_paramagnetic
float system_molecular_weight
The systems molecular weigth in dalton.
vector< RelatedDB > related_database_entries
ChemicalUnit & getChemicalUnit(Position i)
MonomericPolymer * monomeric_polymer
void setChain(Chain const &chain)
Set the chain.
Peptides::NameConverter name_converter_
const Atom * getBALLAtom(const NMRAtomData &nmr_atom) const
const Chain * getChain() const
Get the chain.
const NMRStarFile * getNMRStarFile() const
Get the NMRStar file.
BALLToBMRBMapper(Chain const &chain, const NMRStarFile &nmr_data, const String &chemical_unit)
BMRBToBALLMapping & getBMRBToBALLMapping()
Return the mapping
BALLToBMRBMapping & getBALLToBMRBMapping()
Return the mapping
bool isMapped(Atom const *atom) const
int getNumberOfGaps()
Return the number of mismatches in the current mapping.
const NMRAtomDataSet * getNMRAtomDataSet() const
int getNumberOfMismatches()
Return the number of mismatches in the current mapping.
bool isMapped(const NMRAtomData &nmr_atom) const
Test whether the given nmr atom data is mapped to a structure atom.
virtual ~BALLToBMRBMapper()
Destructor.
void setNMRStarFile(NMRStarFile const &nmrfile)
Set the NMRStar file.
const BALLToBMRBMapping & getBALLToBMRBMapping() const
Return the mapping
void setNMRAtomDataSet(NMRAtomDataSet const &nmr_atom_data_set)
Set the NMRAtomDataSet.
BALLToBMRBMapping ball_to_bmrb_map_
map BALL atoms to NMR atom data
std::map< const NMRAtomData *, Atom const * > BMRBToBALLMapping
std::map< Atom const *, BMRBIndex > BALLToBMRBMapping
const NMRAtomDataSet * nmr_atom_data_set_
std::pair< Position, Position > BMRBIndex
bool setNMRAtomDataSetByName(String const &chemical_unit_name)
Set the NMRAtomDataSet by chemical unit name.
const BMRBToBALLMapping & getBMRBToBALLMapping() const
Return the mapping
Position nmr_atom_data_set_index_
BMRBToBALLMapping bmrb_to_ball_map_
map NMR atom data to BALL atoms
bool createTrivialMapping()
const NMRStarFile * nmr_data_
bool createMapping(const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
This class provides conversion of atom names between naming schemata.
std::ios::openmode OpenMode