Gromacs
2025.0-dev-20241011-013a99c
|
#include <gromacs/gmxpreprocess/gpp_atomtype.h>
Storage of all atom types used during preprocessing of a simulation input.
Public Member Functions | |
PreprocessingAtomTypes (PreprocessingAtomTypes &&old) noexcept | |
Move constructor. | |
PreprocessingAtomTypes & | operator= (PreprocessingAtomTypes &&old) noexcept |
Move assignment constructor. | |
std::optional< int > | atomTypeFromName (const std::string &str) const |
Get atom type index for atom type name if present in the database, or empty optional. More... | |
size_t | size () const |
Get number of defined atom types. | |
std::optional< const std::string > | atomNameFromAtomType (int nt) const |
Get name of atom from internal atom type number. More... | |
std::optional< real > | atomMassFromAtomType (int nt) const |
Get normal mass of atom from internal atom type number. More... | |
std::optional< real > | atomChargeFromAtomType (int nt) const |
Get normal charge of atom from internal atom type number. More... | |
std::optional< ParticleType > | atomParticleTypeFromAtomType (int nt) const |
Get particle type for atom type nt . More... | |
std::optional< int > | bondAtomTypeFromAtomType (int nt) const |
Get bond atom parameter of atom from internal atom type number. More... | |
std::optional< int > | atomNumberFromAtomType (int nt) const |
Get atomic number of atom from internal atom type number. More... | |
std::optional< real > | atomNonBondedParamFromAtomType (int nt, int param) const |
Get the value of param of type nt . More... | |
bool | isSet (int nt) const |
If a value is within the range of the current types or not. More... | |
std::optional< int > | setType (int nt, const t_atom &a, const std::string &name, const InteractionOfType &nb, int bondAtomType, int atomNumber) |
Set the values of an existing atom type nt . More... | |
int | addType (const t_atom &a, const std::string &name, const InteractionOfType &nb, int bondAtomType, int atomNumber) |
Add a unique type to the database. More... | |
void | renumberTypes (gmx::ArrayRef< InteractionsOfType > plist, gmx_mtop_t *mtop, int *wallAtomType, bool verbose) |
Renumber existing atom type entries. More... | |
int PreprocessingAtomTypes::addType | ( | const t_atom & | a, |
const std::string & | name, | ||
const InteractionOfType & | nb, | ||
int | bondAtomType, | ||
int | atomNumber | ||
) |
Add a unique type to the database.
[in] | a | Atom information. |
[in] | name | Atom name. |
[in] | nb | Nonbonded parameters. |
[in] | bondAtomType | What kind of bonded interactions are there. |
[in] | atomNumber | Atomic number of the entry. |
std::optional< real > PreprocessingAtomTypes::atomChargeFromAtomType | ( | int | nt | ) | const |
Get normal charge of atom from internal atom type number.
[in] | nt | Internal number of atom type. |
std::optional< real > PreprocessingAtomTypes::atomMassFromAtomType | ( | int | nt | ) | const |
Get normal mass of atom from internal atom type number.
[in] | nt | Internal number of atom type. |
std::optional< const std::string > PreprocessingAtomTypes::atomNameFromAtomType | ( | int | nt | ) | const |
Get name of atom from internal atom type number.
[in] | nt | Internal number of atom type. |
std::optional< real > PreprocessingAtomTypes::atomNonBondedParamFromAtomType | ( | int | nt, |
int | param | ||
) | const |
Get the value of param
of type nt
.
[in] | param | The parameter value to find. |
[in] | nt | The number of the type. |
std::optional< int > PreprocessingAtomTypes::atomNumberFromAtomType | ( | int | nt | ) | const |
Get atomic number of atom from internal atom type number.
[in] | nt | Internal number of atom type. |
std::optional< ParticleType > PreprocessingAtomTypes::atomParticleTypeFromAtomType | ( | int | nt | ) | const |
Get particle type for atom type nt
.
[in] | nt | Internal number of atom type. |
std::optional< int > PreprocessingAtomTypes::atomTypeFromName | ( | const std::string & | str | ) | const |
Get atom type index for atom type name if present in the database, or empty optional.
[in] | str | Input string to search type for. |
std::optional< int > PreprocessingAtomTypes::bondAtomTypeFromAtomType | ( | int | nt | ) | const |
Get bond atom parameter of atom from internal atom type number.
[in] | nt | Internal number of atom type. |
bool PreprocessingAtomTypes::isSet | ( | int | nt | ) | const |
If a value is within the range of the current types or not.
[in] | nt | Value to check. |
void PreprocessingAtomTypes::renumberTypes | ( | gmx::ArrayRef< InteractionsOfType > | plist, |
gmx_mtop_t * | mtop, | ||
int * | wallAtomType, | ||
bool | verbose | ||
) |
Renumber existing atom type entries.
[in] | plist | List of parameters. |
[in] | mtop | Global topology. |
[in,out] | wallAtomType | Atom types of wall atoms, which may also be renumbered |
[in] | verbose | If we want to print additional info. |
std::optional< int > PreprocessingAtomTypes::setType | ( | int | nt, |
const t_atom & | a, | ||
const std::string & | name, | ||
const InteractionOfType & | nb, | ||
int | bondAtomType, | ||
int | atomNumber | ||
) |
Set the values of an existing atom type nt
.
[in] | nt | Type that should be set. |
[in] | a | Atom information. |
[in] | name | Atom name. |
[in] | nb | Nonbonded parameters. |
[in] | bondAtomType | What kind of bonded interactions are there. |
[in] | atomNumber | Atomic number of the entry. |