BALL::NMRStarFile Class Reference

#include <BALL/FORMAT/NMRStarFile.h>

Inheritance diagram for BALL::NMRStarFile:
BALL::LineBasedFile BALL::File

List of all members.


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 NMRStarFileoperator= (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< NMRAtomDataSetatom_data_sets_
 

the data for the atoms is stored here


std::vector< SampleConditionsample_conditions_
 

the data for different sample sets


std::vector< ShiftReferenceSetshift_references_
 

the data for shift references


String system_name_
 

name of the molecular system



Static Private Attributes

static std::vector< Stringreference_options_
 

contains Strings with the used reference options



Detailed Description

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().


Member Enumeration Documentation

Enumerator:
INTERNAL_REFERENCE 
EXTERNAL_REFERENCE 
UNKNOWN_REFERENCE 
UNSET_REFERENCE 
Enumerator:
DIRECT_TYPE 
INDIRECT_TYPE 
UNKNOWN_TYPE 
UNSET_TYPE 

internal enumeration used in readShiftReferences_()

Enumerator:
MOL_COMMON_NAME 
ATOM_TYPE 
ISOTOPE_NUMBER 
ATOM_GROUP 
SHIFT_UNITS 
SHIFT_VALUE 
REFERENCE_METHOD 
REFERENCE_TYPE 
INDIRECT_SHIFT_RATIO 

Constructor & Destructor Documentation

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 (  ) 

Member Function Documentation

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.

See also:
NMRStarFile(const NMRStarFile& f)
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


Member Data Documentation

the data for the atoms is stored here

the number of shift data

std::vector<String> BALL::NMRStarFile::reference_options_ [static, private]

contains Strings with the used reference options

the data for different sample sets

the data for shift references

name of the molecular system