Store a data item from within an SD file. Data items begin with a line of the form "> <ITEM_NAME>" (additional specifications are possible), end with a single blank line, and can contain customized format information. The information will be read as a series of raw strings, one per line and each representing a whole line. Once read, member functions of the class can extract specific integer, real, char4, or string coded data from within the item.
More...
|
bool | placeInternalRegnoInHeader () const |
| Indicate whether to display the internal identification number (based on the position of the molecule in the SD file) in the header line.
|
|
bool | placeExternalRegnoInHeader () const |
| Indicate whether to display the (user-supplied) external identification number in the header line.
|
|
bool | placeTitleInHeader () const |
| Indicate whether to display the data item name (title) in the header line, between angular brackets.
|
|
bool | placeMaccsIIFieldInHeader () const |
| Indicate whether to display the MACCS-II field number in the header.
|
|
bool | noteArchivesInHeader () const |
| Indicate that the "FROM ARCHIVES" tag should go in the header line.
|
|
const std::string & | getItemName () const |
| Get a const reference to the item name, if it exists. If there is no item name, a const reference to a blank string will be returned.
|
|
const std::string & | getOutputItemName () const |
| Get a const reference to the output item name, if it exists. If there is no item name, a const reference to a blank string will be returned.
|
|
const std::string & | getExternalRegistryNumber () const |
| Get the external registry number.
|
|
int | getInternalRegistryNumber () const |
| Get the internal registry number. This will return -1 if no such registry number exists.
|
|
int | getMaccsFieldNumber () const |
| Get the MACCS-II database field number.
|
|
StateVariable | getTrackedState () const |
| Get the state variable enumeration for this data item. This is used in the case of a STATE_VARIABLE kind of data item, to signal that a particular component of the molecular mechanics energy, or some intensive or expansive system property, should be retrieved.
|
|
int | getDataLineCount () const |
| Get the data line count.
|
|
const std::string & | getDataLine (const int line_index) const |
| Get a particular data lines from the item body.
|
|
const std::vector< std::string > & | getBody () const |
| Get all data lines.
|
|
MdlMolDataItemKind | getKind () const |
| Get the custom data item type. Here, the "NATIVE" code indicates that no custom enumeration is present.
|
|
void | setItemName (const std::string &item_name_in, ModificationPolicy mpol=ModificationPolicy::DO_NOT_MODIFY, ExceptionResponse notify=ExceptionResponse::WARN) |
| Set the item name and apply checks to the result.
|
|
void | addDataLine (const std::string &text) |
| Add a line to the data item.
|
|
|
| MdlMolDataItem (const std::string &item_name_in=std::string(""), const std::string &external_regno_in=std::string(""), int internal_regno_in=-1, int maccs_ii_number_in=-1, uint header_info=0U, const std::vector< std::string > &body_in={}, ModificationPolicy mpol=ModificationPolicy::DO_NOT_MODIFY, ExceptionResponse notify=ExceptionResponse::WARN) |
| The constructor takes the original text file and the number of the first line of the data item, or the information pertinent to the header line and a series of strings that will form the body of data in the item. Any information submitted as part of a string such as an atom or bond index, which could then go to an output file, must be in the Fortran array indexing (starting at 1). Integer information read from the data body can be adjusted to meet internal array indexing.
|
|
| MdlMolDataItem (const TextFile &tf, int line_number, int *line_advance, int compound_line_end=-1, const std::string &title=std::string(""), ModificationPolicy mpol=ModificationPolicy::DO_NOT_MODIFY, ExceptionResponse notify=ExceptionResponse::WARN) |
|
| MdlMolDataItem (const MdlMolDataRequest &ask, const std::vector< std::string > &body_in, ModificationPolicy mpol=ModificationPolicy::DO_NOT_MODIFY, ExceptionResponse notify=ExceptionResponse::WARN) |
|
|
| MdlMolDataItem (const MdlMolDataItem &original)=default |
| The default copy and move constructors, as well as copy and move assignment operators, are applicable to this object which has no const members or pointers to repair.
|
|
| MdlMolDataItem (MdlMolDataItem &&original)=default |
|
MdlMolDataItem & | operator= (const MdlMolDataItem &other)=default |
|
MdlMolDataItem & | operator= (MdlMolDataItem &&other)=default |
|
|
std::string | parseString (int element_number, int line_number) const |
| Retrieve a string from the data lines of a data item, assuming that individual words on each line are separated by one or more white space characters and that the quotation marks "" and '' collect everything between them into a single word.
|
|
std::string | parseString (int start_pos, int length, int line_number) const |
|
|
llint | parseInteger (int element_number, int line_number) const |
| Retrieve a signed integer from the data lines of a data item. The assumptions of parseString() above apply, as do the overloads and descriptions of formal arguments.
|
|
llint | parseInteger (int start_pos, int length, int line_number) const |
|
|
ullint | parseUnsigned (int element_number, int line_number) const |
| Retrieve an unsigned integer from the data lines of a data item. The assumptions of parseString() above apply, as do the overloads and descriptions of formal arguments.
|
|
ullint | parseUnsigned (int start_pos, int length, int line_number) const |
|
|
double | parseReal (int element_number, int line_number) const |
| Retrieve a real number from the data lines of a data item. The assumptions of parseString() above apply, as do the overloads and descriptions of formal arguments.
|
|
double | parseReal (int start_pos, int length, int line_number) const |
|
|
char4 | parseChar4 (int element_number, int line_number) const |
| Retrieve a tuple of four characters from the data lines of a data item. Assumptions from parseString() above apply, as do overloads and descriptions of formal arguments.
|
|
char4 | parseChar4 (int start_pos, int length, int line_number) const |
|
|
bool | matchItemName (const std::string &item_name_comp, const std::string &ext_regno_comp, int maccs_ii_no_comp=-1) const |
| Match this data item with a series of identification tags.
|
|
bool | matchItemName (const std::string &item_name_comp, int maccs_ii_no_comp=-1) const |
|
bool | matchRegistryNumber (const std::string &ext_regno_comp, int maccs_ii_no_comp=-1) const |
|
bool | matchMaccsField (int maccs_ii_no_comp) const |
|
Store a data item from within an SD file. Data items begin with a line of the form "> <ITEM_NAME>" (additional specifications are possible), end with a single blank line, and can contain customized format information. The information will be read as a series of raw strings, one per line and each representing a whole line. Once read, member functions of the class can extract specific integer, real, char4, or string coded data from within the item.