#include <BALL/FORMAT/NMRStarFile.h>
Public Types | |
Enums | |
enum | ReferenceMethod { INTERNAL_REFERENCE, EXTERNAL_REFERENCE, UNKNOWN_REFERENCE, UNSET_REFERENCE } |
enum | ReferenceType { DIRECT_TYPE, INDIRECT_TYPE, UNKNOWN_TYPE, UNSET_TYPE } |
Public Member Functions | |
Constructors and Destructors | |
NMRStarFile () | |
NMRStarFile (const NMRStarFile &f) throw (Exception::FileNotFound) | |
NMRStarFile (const String &file_name) throw (Exception::FileNotFound, Exception::ParseError) | |
const NMRStarFile & | operator= (const NMRStarFile &f) |
~NMRStarFile () | |
void | clear () |
Access methods | |
Size | getNumberOfAtoms () const |
const std::vector < NMRAtomDataSet > & | getData () const |
Equality | |
bool | operator== (const NMRStarFile &f) |
bool | operator!= (const NMRStarFile &f) |
Private Types | |
enum | ShiftReferenceTypes_ { MOL_COMMON_NAME, ATOM_TYPE, ISOTOPE_NUMBER, ATOM_GROUP, SHIFT_UNITS, SHIFT_VALUE, REFERENCE_METHOD, REFERENCE_TYPE, INDIRECT_SHIFT_RATIO } |
internal enumeration used in readShiftReferences_() More... | |
Private Member Functions | |
NMRAtomData | processShiftLine_ () throw (Exception::ParseError) |
function to extract the data from a chemical shift line | |
void | readEntryInformation_ () throw (Exception::ParseError, Exception::InvalidFormat) |
reads the number of chemical shifts | |
void | readMolSystem_ () |
reads the molecular system name | |
void | readSampleConditions_ () |
reads the sample conditions | |
void | readShiftReferences_ () |
reads the shift references | |
void | readShifts_ () throw (Exception::ParseError) |
reads the shift datas | |
Static Private Member Functions | |
static void | initializeReferenceOptions_ () |
initialize the referenceOptions | |
Private Attributes | |
Size | number_of_shifts_ |
the number of shift data | |
std::vector< NMRAtomDataSet > | atom_data_sets_ |
the data for the atoms is stored here | |
std::vector< SampleCondition > | sample_conditions_ |
the data for different sample sets | |
std::vector< ShiftReferenceSet > | shift_references_ |
the data for shift references | |
String | system_name_ |
name of the molecular system | |
Static Private Attributes | |
static std::vector< String > | reference_options_ |
contains Strings with the used reference options |
NMRStarFile. This class is designed to read a NMR-Star-File. To read a file simpy use the NMRStarFile(char* filename)- Constructor. All useful data are extracted and stored. To get access to the data use getData().
enum BALL::NMRStarFile::ShiftReferenceTypes_ [private] |
internal enumeration used in readShiftReferences_()
BALL::NMRStarFile::NMRStarFile | ( | ) |
Standard constructor
BALL::NMRStarFile::NMRStarFile | ( | const NMRStarFile & | f | ) | throw (Exception::FileNotFound) |
Copy constructor. If the file was open, it is closed. Then the file of f will be opend. All data already extracted in f is copied to this instance.
BALL::NMRStarFile::NMRStarFile | ( | const String & | file_name | ) | throw (Exception::FileNotFound, Exception::ParseError) |
Detailed constuctor. Opens the given file and extracts all usefull data.
BALL::NMRStarFile::~NMRStarFile | ( | ) |
void BALL::NMRStarFile::clear | ( | ) | [virtual] |
Clear the object.
Reimplemented from BALL::LineBasedFile.
const std::vector<NMRAtomDataSet>& BALL::NMRStarFile::getData | ( | ) | const |
Get the extracted data for the atoms.
Size BALL::NMRStarFile::getNumberOfAtoms | ( | ) | const |
Get the maiximum number of atoms in all shift sets
static void BALL::NMRStarFile::initializeReferenceOptions_ | ( | ) | [static, private] |
initialize the referenceOptions
bool BALL::NMRStarFile::operator!= | ( | const NMRStarFile & | f | ) |
Inequality operator Test if both instances point to different files.
const NMRStarFile& BALL::NMRStarFile::operator= | ( | const NMRStarFile & | f | ) |
Assignment operator.
bool BALL::NMRStarFile::operator== | ( | const NMRStarFile & | f | ) |
Equality operator. Test if both instances point to the same file.
NMRAtomData BALL::NMRStarFile::processShiftLine_ | ( | ) | throw (Exception::ParseError) [private] |
function to extract the data from a chemical shift line
void BALL::NMRStarFile::readEntryInformation_ | ( | ) | throw (Exception::ParseError, Exception::InvalidFormat) [private] |
reads the number of chemical shifts
void BALL::NMRStarFile::readMolSystem_ | ( | ) | [private] |
reads the molecular system name
void BALL::NMRStarFile::readSampleConditions_ | ( | ) | [private] |
reads the sample conditions
void BALL::NMRStarFile::readShiftReferences_ | ( | ) | [private] |
reads the shift references
void BALL::NMRStarFile::readShifts_ | ( | ) | throw (Exception::ParseError) [private] |
reads the shift datas
std::vector<NMRAtomDataSet> BALL::NMRStarFile::atom_data_sets_ [private] |
the data for the atoms is stored here
Size BALL::NMRStarFile::number_of_shifts_ [private] |
the number of shift data
std::vector<String> BALL::NMRStarFile::reference_options_ [static, private] |
contains Strings with the used reference options
std::vector<SampleCondition> BALL::NMRStarFile::sample_conditions_ [private] |
the data for different sample sets
std::vector<ShiftReferenceSet> BALL::NMRStarFile::shift_references_ [private] |
the data for shift references
String BALL::NMRStarFile::system_name_ [private] |
name of the molecular system