Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
PreprocessingBondAtomType Class Reference

#include <gromacs/gmxpreprocess/gpp_bond_atomtype.h>

Description

Storage for all bonded atomtypes during simulation preprocessing.

Public Member Functions

size_t size () const
 Get number of defined bond atom types.
 
const char * atomNameFromBondAtomType (int nt) const
 Get name of atom from internal bond atom type number. More...
 
int bondAtomTypeFromName (const std::string &str) const
 Get bond atom type index for atom type name if present in the database, or NOTSET. More...
 
int addBondAtomType (t_symtab *tab, const std::string &name)
 Add a complete new bond atom type. More...
 
bool isSet (int nt) const
 If a value is within the range of the current types or not. More...
 

Member Function Documentation

int PreprocessingBondAtomType::addBondAtomType ( t_symtab *  tab,
const std::string &  name 
)

Add a complete new bond atom type.

Parameters
[in]tabSymbol table.
[in]nameAtom name.
Returns
The number of entries in database or the type number of an already set type.
const char * PreprocessingBondAtomType::atomNameFromBondAtomType ( int  nt) const

Get name of atom from internal bond atom type number.

Parameters
[in]ntInternal number of atom type.
Returns
The type name.
int PreprocessingBondAtomType::bondAtomTypeFromName ( const std::string &  str) const

Get bond atom type index for atom type name if present in the database, or NOTSET.

Todo:
The code should be changed to instead use a gmx::compat version of std::optional to return a handle to the element being searched, or an empty optional construct if the entry has not been found.
Parameters
[in]strInput string to search type for.
Returns
Atomtype as integer.
bool PreprocessingBondAtomType::isSet ( int  nt) const

If a value is within the range of the current types or not.

Parameters
[in]ntValue to check.
Returns
True if value is in range.

The documentation for this class was generated from the following files: