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_;
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
bool has(const String &key) const
This class provides methods for reading and assigning chemical shifts.
void addMonomericPolymer(MonomericPolymer mp)
ShiftReferenceSet & getShiftReferenceSet(Position i)
Get the i-th shift reference set.
bool hasSampleCondition(String name)
const MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label) const
NMRSpectrometer & getNMRSpectrometerByName(String name)
Get the spectrometer by its SaveFrame name.
const NMRSpectrometer & getNMRSpectrometerByName(String name) const
Get the spectrometer by its SaveFrame name.
Size getNumberOfNMRSpectrometers() const
Get the number of nmr spectrometers.
const EntryInformation & getEntryInformation() const
Size getNumberOfShiftsAssigned() const
Size getNumberOfMonomericPolymers() const
Get the number of monomeric polymers in the file.
String getResidueSequence(Position i=0) const
String getNMRSpectrometerManufacturer(Position i) const
Get the spectrometer manufacturer.
const std::vector< NMRSpectrometer > & getNMRSpectrometers() const
Get the spectrometers.
SampleCondition & getSampleCondition(Position i)
Get the i-th SampleCondition.
const NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name) const
bool hasCshifts() const
Check, whether this NMRFile provides carbon shifts.
NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i)
Sample getSample(String label) const
static const float FLOAT_VALUE_NA
const std::vector< SampleCondition > & getSampleConditions() const
Get the sample conditions.
bool hasNshifts() const
Check, whether this NMRFile provides nitrogen shifts.
const SampleCondition & getSampleCondition(Position i) const
Get the i-th SampleCondition.
bool hasSampleCondition(String name) const
SampleCondition & getSampleConditionByName(String name)
std::vector< NMRSpectrometer > & getNMRSpectrometers()
Get the spectrometers.
bool hasShiftReferenceSet(String name)
Check if there is a ShiftReferenceSet named name.
bool assignShifts(BALLToBMRBMapper &ball_to_bmrb_mapping)
const ShiftReferenceSet & getShiftReferenceSet(Position i) const
Get the i-th shift reference set.
bool hasMonomericPolymer(String name) const
Check if polymer name is already stored is a monomeric polymer.
Size getNumberOfAtoms() const
std::vector< Sample > getSamples() const
Get the samples.
const SampleCondition & getSampleConditionByName(String name) const
bool hasSample(String label) const
Return true if the file contains a sample named label, false otherwise.
bool isMonomericPolymer(String chemical_unit_label)
const NMRSpectrometer & getNMRSpectrometer(Position i) const
Get the i-th spectrometer.
const MolecularSystem & getMolecularInformation() const
NMRStarFile(const String &file_name, File::OpenMode open_mode=std::ios::in)
const std::vector< ShiftReferenceSet > & getShiftReferenceSets() const
Get the shift reference sets.
const NMRStarFile::MonomericPolymer & getMonomericPolymer(Position i) const
std::vector< ShiftReferenceSet > & getShiftReferenceSets()
Get the shift reference sets.
bool assignShifts(AtomContainer &ac, const String &chemical_unit, const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
MolecularSystem::ChemicalUnit & getChemicalUnitByLabel(String const &label)
static const Position POSITION_VALUE_NA
const ShiftReferenceSet & getShiftReferenceSetByName(String name) const
Get a ShiftReferenceSet by its SaveFrame name.
Size getNumberOfSampleConditions() const
Get the number of sample conditions.
static const int INT_VALUE_NA
MolecularSystem & getMolecularInformation()
Sample getSample(Position i) const
std::vector< SampleCondition > & getSampleConditions()
Get the sample conditions.
const std::vector< NMRAtomDataSet > & getNMRData() const
bool hasHshifts() const
Check, whether this NMRFile provides hydrogen shifts.
ShiftReferenceSet & getShiftReferenceSetByName(String name)
Get a ShiftReferenceSet by its SaveFrame name.
float getNMRSpectrometerFieldStrength(Position i) const
Get the spectrometer field strength.
Size getNumberOfShiftReferenceSets() const
Get the number of shift reference sets.
bool read(AtomContainer &ac)
Size getNumberOfSamples() const
Get the number of samples.
~NMRStarFile()
Destructor.
NMRStarFile::MonomericPolymer & getMonomericPolymer(const String &name)
NMRSpectrometer & getNMRSpectrometer(Position i)
Get the i-th spectrometer.
vector< MonomericPolymer > getMonomericPolymers() const
Get all Monomeric Polymers.
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
ChemicalUnit & getChemicalUnit(Position i)
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
MonomericPolymer * monomeric_polymer
void setChain(Chain const &chain)
Set the chain.
const Atom * getBALLAtom(const NMRAtomData &nmr_atom) const
const BMRBToBALLMapping & getBMRBToBALLMapping() const
Return the mapping
Peptides::NameConverter name_converter_
const BALLToBMRBMapping & getBALLToBMRBMapping() const
Return the mapping
const Chain * getChain() const
Get the chain.
BALLToBMRBMapper(Chain const &chain, const NMRStarFile &nmr_data, const String &chemical_unit)
BALLToBMRBMapping & getBALLToBMRBMapping()
Return the mapping
bool isMapped(Atom const *atom) const
const NMRStarFile * getNMRStarFile() const
Get the NMRStar file.
int getNumberOfGaps()
Return the number of mismatches in the current mapping.
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 NMRAtomDataSet * getNMRAtomDataSet() const
void setNMRAtomDataSet(NMRAtomDataSet const &nmr_atom_data_set)
Set the NMRAtomDataSet.
BMRBToBALLMapping & getBMRBToBALLMapping()
Return the mapping
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.
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