STORMM Source Documentation
|
Distill the results of file identification, producing clean lists of free topologies, free coordinate files, and linked topology / coordinate systems. Record output and trajectory files, if available. More...
#include <nml_files.h>
Public Member Functions | |
int | getStructureCount () const |
Get the structure count, based on the number of free coordinate files as well as the number of systems, with frame counts and replicas therein. If one of the systems does not have the requisite number of frames, this is an error and may be trapped. The structure count reported here is therefore a maximum that can be expected. | |
int | getFreeTopologyCount () const |
Get the free topology count. | |
int | getFreeCoordinatesCount () const |
Get the free coordinate file count. | |
int | getSystemDefinitionCount () const |
Get the number of system specifications made with the -sys keyword. | |
bool | readAllFreeFrames () const |
Get the indicator of whether to read all free coordinate files' frames. | |
CoordinateFileKind | getOutputCoordinateFormat () const |
Get the coordinate (trajectory) file output format. | |
CoordinateFileKind | getCheckpointFormat () const |
Get the coordinate (checkpoint) file output format. | |
TrajectoryFusion | getFileFusionProtocol () const |
Get the preferences for fusing output coordinate files. | |
MoleculeSystem | getSystem (int index) const |
Get a molecule system from this object's array. | |
std::string | getReportFile () const |
Get the name of the report file (equivalent to mdout in sander or pmemd) | |
std::string | getInputTranscriptFile () const |
Get the name of the input transcript file (there is no sander or pmemd equivalent other than the verbose reproduction of the input settings at the beginning of mdout) | |
std::string | getTrajectoryFileName () const |
Get the base name of trajectory files to write. | |
std::string | getCheckpointFileName () const |
Get the base name of (coordinate) checkpoint files to write. | |
std::string | getWarningFileName () const |
Get the name of the file containing warnings printed by the program. | |
ModificationPolicy | getSdfModificationPolicy () const |
Get the policy on modifying .sdf file outputs to conform to the Biovia standard. | |
ExceptionResponse | getSdfNotifications () const |
Get an indication of whether to alert the user when correcting minor mistakes in .sdf files. | |
const NamelistEmulator & | getTranscript () const |
Get the original namelist emulator object as a transcript of the user input. | |
void | setAllFreeFrameReading (const bool active) |
Set whether to read all frames from each free trajectory (true), or just the first (false). | |
void | addFreeTopologyName (const std::string &file_name) |
Add a free topology to the list, after checking for its prior existence in the list. | |
void | addFreeCoordinateName (const std::string &file_name) |
Add a free coordinate file to the list, after checking for its prior existence. | |
void | addSystem (const MoleculeSystem &new_mol) |
Add a system to the list. | |
void | removeSystem (int index, int stretch=1) |
Remove entries from the systems array. | |
void | setReportFileName (const std::string &file_name) |
Set the report file name. | |
void | setInputTranscriptFileName (const std::string &file_name) |
Set the input transcript file name. | |
void | setGeneralTrajectoryFileName (const std::string &proto_name) |
Set the general (fallback) coordinate output file name. | |
void | setGeneralCheckpointFileName (const std::string &proto_name) |
Set the general (fallback) checkpoint file name. | |
void | setWarningFileName (const std::string &file_name) |
Set the warning file name. | |
void | setSdfModficiationPolicy (ModificationPolicy policy_in) |
Set the .sdf output file modification policy. | |
void | setSdfNotifications (ExceptionResponse policy_in) |
Set whether to emit notifications about .sdf output file modifications. | |
FilesControls (ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO) | |
The constructor can prepare an object with default settings or read the corresponding namelist to accept user input. | |
FilesControls (const TextFile &tf, int *start_line, bool *found_nml=nullptr, ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO, const std::vector< std::string > &alternatives={}, const std::vector< std::string > &sys_requirements={"-pe", "-ce"}) | |
FilesControls (const FilesControls &original)=default | |
As with other control objects, copy and move constructors, plus copy and move assignment operators, can all take their default forms. | |
FilesControls (FilesControls &&original)=default | |
FilesControls & | operator= (const FilesControls &original)=default |
FilesControls & | operator= (FilesControls &&original)=default |
std::string | getFreeTopologyName (int index) const |
Get one or more free topology names. | |
std::vector< std::string > | getFreeTopologyNames () const |
std::string | getFreeCoordinateName (int index) const |
Get one or more free coordinate file names. | |
std::vector< std::string > | getFreeCoordinateNames () const |
void | setOutputCoordinateFormat (const std::string &traj_kind) |
Set the coordinate (trajectory) file output format. | |
void | setOutputCoordinateFormat (CoordinateFileKind traj_kind) |
void | setCheckpointFormat (const std::string &chk_kind) |
Set the checkpoint (coordinate) file output format. | |
void | setCheckpointFormat (CoordinateFileKind chk_kind) |
void | removeFreeTopologyName (int index, int stretch=1) |
Remove entries from the free topologies array. | |
void | removeFreeTopologyName (const std::string &fname) |
void | removeFreeCoordinateName (int index, int stretch=1) |
Remove entries from the free coordinates array. | |
void | removeFreeCoordinateName (const std::string &fname) |
Distill the results of file identification, producing clean lists of free topologies, free coordinate files, and linked topology / coordinate systems. Record output and trajectory files, if available.
stormm::namelist::FilesControls::FilesControls | ( | ExceptionResponse | policy_in = ExceptionResponse::DIE, |
WrapTextSearch | wrap = WrapTextSearch::NO ) |
The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.
policy_in | Requested error handling behavior |
tf | Input file translated into RAM |
start_line | Line of the input file to begin searching for the &solvent namelist |
found_nml | Indication that the namelist was found |
report_name_in | New default name of the report file (for application-specific naming conventions) |
coord_base_in | New default base name of trajectory or other coordinate files (for application-specific naming conventions) |
coord_ext_in | New default extension of trajectory or other coordinate files (for application-specific naming conventions) |
sys_requirements | System requirements specifications. The -sys keyword will be critical under different circumstances and has no defaults. Some situations may not require the user to specify all four of the files associated with the -sys keyword, and some situations will require that certain files exist in addition to merely being specified. This array can hold four critical specifiers, -p, -c, -x, and -r, for "topology", "input coordinates", "trajectory", and "restart / checkpoint" files, respectively, and each can accept the extension "e" to indicate that the file must exist. Conversely, a "g" extension indicates that, in that particular context, the file subkey is bogus and should trigger an exception consistent with the stated policy (policy_in). Default requirements are a topology and input coordinates, both of which must exist. |
wrap | Indicate that the search for a &files namelist should carry on from the beginning of an input file if no such namelist is found starting from the original starting point |
void stormm::namelist::FilesControls::addFreeCoordinateName | ( | const std::string & | file_name | ) |
Add a free coordinate file to the list, after checking for its prior existence.
file_name | Name of the coordinate file to add |
void stormm::namelist::FilesControls::addFreeTopologyName | ( | const std::string & | file_name | ) |
Add a free topology to the list, after checking for its prior existence in the list.
file_name | Name of the topology file to add |
void stormm::namelist::FilesControls::addSystem | ( | const MoleculeSystem & | new_mol | ) |
Add a system to the list.
new_mol | The new molecule system to push to the back of the list |
std::string stormm::namelist::FilesControls::getFreeCoordinateName | ( | int | index | ) | const |
Get one or more free coordinate file names.
Overloaded:
index | The index to query |
std::string stormm::namelist::FilesControls::getFreeTopologyName | ( | int | index | ) | const |
Get one or more free topology names.
Overloaded:
index | The index to query |
MoleculeSystem stormm::namelist::FilesControls::getSystem | ( | int | index | ) | const |
Get a molecule system from this object's array.
index | The index to query |
void stormm::namelist::FilesControls::removeFreeCoordinateName | ( | int | index, |
int | stretch = 1 ) |
Remove entries from the free coordinates array.
Overloaded:
index | Starting index for system removal, or the one system to remove |
stretch | Number of systems, including the starting index, to remove from the list |
void stormm::namelist::FilesControls::removeFreeTopologyName | ( | int | index, |
int | stretch = 1 ) |
Remove entries from the free topologies array.
Overloaded:
index | Starting index for system removal, or the one system to remove |
stretch | Number of systems, including the starting index, to remove from the list |
void stormm::namelist::FilesControls::removeSystem | ( | int | index, |
int | stretch = 1 ) |
Remove entries from the systems array.
index | Starting index for system removal, or the one system to remove |
stretch | Number of systems, including the starting index, to remove from the list |
void stormm::namelist::FilesControls::setAllFreeFrameReading | ( | const bool | active | ) |
Set whether to read all frames from each free trajectory (true), or just the first (false).
active | Indicator of whether to have all free frames read (true), or not (false) |
void stormm::namelist::FilesControls::setCheckpointFormat | ( | const std::string & | chk_kind | ) |
Set the checkpoint (coordinate) file output format.
Overloaded:
chk_kind | The selected checkpoint format |
void stormm::namelist::FilesControls::setGeneralCheckpointFileName | ( | const std::string & | proto_name | ) |
Set the general (fallback) checkpoint file name.
proto_name | New generic name for unspecified checkpoint files |
void stormm::namelist::FilesControls::setGeneralTrajectoryFileName | ( | const std::string & | proto_name | ) |
Set the general (fallback) coordinate output file name.
proto_name | New generic name for unspecified trajectory files |
void stormm::namelist::FilesControls::setInputTranscriptFileName | ( | const std::string & | file_name | ) |
Set the input transcript file name.
file_name | New name for the input transcript file |
void stormm::namelist::FilesControls::setOutputCoordinateFormat | ( | const std::string & | traj_kind | ) |
Set the coordinate (trajectory) file output format.
Overloaded:
traj_kind | The selected trajectory format |
void stormm::namelist::FilesControls::setReportFileName | ( | const std::string & | file_name | ) |
Set the report file name.
file_name | New name for the calculation report file |
void stormm::namelist::FilesControls::setSdfModficiationPolicy | ( | ModificationPolicy | policy_in | ) |
Set the .sdf output file modification policy.
policy_in | The new policy to follow when encountering minor issues in .sdf file data |
void stormm::namelist::FilesControls::setSdfNotifications | ( | ExceptionResponse | policy_in | ) |
Set whether to emit notifications about .sdf output file modifications.
policy_in | The policy to follow on making alerts |
void stormm::namelist::FilesControls::setWarningFileName | ( | const std::string & | file_name | ) |
Set the warning file name.
file_name | New name for the warnings file |