Stores an ordered pair of CHARMM atom-type names for bond lookup. More...
#include <CharmmParameters.h>
Public Member Functions | |
| BondKey (const std::string &iatom, const std::string &jatom) | |
| Constructs a bond key from two atom-type names. | |
| bool | operator== (const BondKey &other) const |
| Returns whether two ordered bond keys are equal. | |
Public Attributes | |
| std::string | atom1 |
| std::string | atom2 |
Friends | |
| bool | operator< (const BondKey &first, const BondKey &second) |
| Orders bond keys in descending lexicographic atom-type order. | |
| std::ostream & | operator<< (std::ostream &output, const BondKey &key) |
| Writes the two atom-type names followed by a trailing space. | |
Stores an ordered pair of CHARMM atom-type names for bond lookup.
The parser canonicalizes a bond by sorting its two atom types before it constructs this value. Direct construction performs no sorting or case conversion.
|
inline |
Constructs a bond key from two atom-type names.
| [in] | iatom | First atom-type name to copy. |
| [in] | jatom | Second atom-type name to copy. |
atom1 == iatom and atom2 == jatom. | std::bad_alloc | If copying either atom-type name requires an allocation that fails. |
|
inline |
Returns whether two ordered bond keys are equal.
| [in] | other | Key to compare with this key. |
true when both atom-type names match in the same order; otherwise, false. Orders bond keys in descending lexicographic atom-type order.
| [in] | first | Left key to compare. |
| [in] | second | Right key to compare. |
true when first sorts before second by descending atom1 and then descending atom2.
|
friend |
Writes the two atom-type names followed by a trailing space.
| [in,out] | output | Stream that receives the text. |
| [in] | key | Bond key to write. |
output after the write. | std::string BondKey::atom1 |
Stores the first atom-type name exactly as supplied.
| std::string BondKey::atom2 |
Stores the second atom-type name exactly as supplied.