Gromacs  2026.0-dev-20241121-c76fa1e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
resall.h File Reference
#include <cstdio>
#include <filesystem>
#include <string>
#include <vector>
#include "gromacs/utility/arrayref.h"
+ Include dependency graph for resall.h:

Description

Methods to get residue information during preprocessing.

Functions

std::string searchResidueDatabase (const std::string &key, gmx::ArrayRef< const PreprocessResidue > rtpDBEntry, const gmx::MDLogger &logger)
 Search for an entry in the rtp database. More...
 
gmx::ArrayRef< const
PreprocessResidue >
::const_iterator 
getDatabaseEntry (const std::string &rtpname, gmx::ArrayRef< const PreprocessResidue > rtpDBEntry)
 Returns matching entry in database. More...
 
PreprocessingAtomTypes read_atype (const std::filesystem::path &ffdir)
 Read atom types into database. More...
 
void readResidueDatabase (const std::filesystem::path &resdb, std::vector< PreprocessResidue > *rtpDBEntry, PreprocessingAtomTypes *atype, t_symtab *tab, const gmx::MDLogger &logger, bool bAllowOverrideRTP)
 Read in database, append to exisiting. More...
 
void print_resall (FILE *out, gmx::ArrayRef< const PreprocessResidue > rtpDBEntry, const PreprocessingAtomTypes &atype)
 Print out database. More...
 

Function Documentation

gmx::ArrayRef<const PreprocessResidue>::const_iterator getDatabaseEntry ( const std::string &  rtpname,
gmx::ArrayRef< const PreprocessResidue rtpDBEntry 
)

Returns matching entry in database.

Parameters
[in]rtpnameName of the entry looked for.
[in]rtpDBEntryDatabase to search.
Exceptions
Ifthe name can not be found in the database.
void print_resall ( FILE *  out,
gmx::ArrayRef< const PreprocessResidue rtpDBEntry,
const PreprocessingAtomTypes atype 
)

Print out database.

Parameters
[in]outFile to write to.
[in]rtpDBEntryDatabase to write out.
[in]atypeAtom type information.
PreprocessingAtomTypes read_atype ( const std::filesystem::path &  ffdir)

Read atom types into database.

Parameters
[in]ffdirForce field directory.
Returns
Atom type database.
void readResidueDatabase ( const std::filesystem::path &  resdb,
std::vector< PreprocessResidue > *  rtpDBEntry,
PreprocessingAtomTypes atype,
t_symtab *  tab,
const gmx::MDLogger logger,
bool  bAllowOverrideRTP 
)

Read in database, append to exisiting.

Parameters
[in]resdbName of database file.
[in,out]rtpDBEntryDatabase to populate.
[in,out]atypeAtomtype information.
[in,out]tabSymbol table for names.
[in]loggerMDLogger interface.
[in]bAllowOverrideRTPIf entries can be overwritten in the database.
std::string searchResidueDatabase ( const std::string &  key,
gmx::ArrayRef< const PreprocessResidue rtpDBEntry,
const gmx::MDLogger logger 
)

Search for an entry in the rtp database.

A mismatch of one character is allowed, if there is only one nearly matching entry in the database, a warning will be generated.

Parameters
[in]keyThe atomname to search for.
[in]rtpDBEntryDatabase with residue information.
[in]loggerLogging object.
Returns
The rtp residue name.