|
| Atom () noexcept=default |
| Default constructor for the Atom struct.
|
|
| Atom (double3 position, double charge, double scalingVDW, double scalingCoulomb, std::uint32_t moleculeId, std::uint16_t type, std::uint8_t componentId, std::uint8_t groupId, std::uint8_t isFractional) |
| Constructs an Atom with specified parameters.
|
|
| Atom (double3 position, double charge, double lambda, std::uint32_t moleculeId, std::uint16_t type, std::uint8_t componentId, std::uint8_t groupId, std::uint8_t isFractional) |
| Constructs an Atom with lambda-dependent scaling.
|
|
void | setScaling (double lambda) |
| Sets the scaling factors based on lambda.
|
|
void | setScalingFullyOn () |
| Fully activates scaling factors.
|
|
void | setScalingFullyOff () |
| Fully deactivates scaling factors.
|
|
void | setScalingToInteger () |
| Sets scaling factors to integer values.
|
|
std::string | repr () const |
| Returns a string representation of the Atom.
|
|
|
double3 | position |
| The position of the atom in 3D space.
|
|
double3 | velocity {} |
| The velocity of the atom.
|
|
double3 | gradient {} |
| The gradient acting on the atom.
|
|
double | charge |
| The electric charge of the atom.
|
|
double | scalingVDW {1.0} |
| Scaling factor for van der Waals interactions.
|
|
double | scalingCoulomb {1.0} |
| Scaling factor for Coulomb interactions.
|
|
std::uint32_t | moleculeId {0} |
| Identifier for the molecule this atom belongs to.
|
|
std::uint16_t | type {0} |
| Type identifier of the atom.
|
|
std::uint8_t | componentId {0} |
| Component identifier within the system.
|
|
std::uint8_t | groupId: 4 |
| Group identifier, defaults to false.
|
|
std::uint8_t | isFractional: 4 |
| Fractional or not, defaults to false.
|
|
Represents an atom in the simulation system.
The Atom struct encapsulates the properties and behaviors of an individual atom within the simulation. It includes positional data, velocity, gradient, charge, scaling factors for van der Waals and Coulomb interactions, and identifiers for molecule, type, component, and group associations. The struct provides constructors for initializing atoms and methods to adjust scaling parameters dynamically. Atom class type should have exactly a size of 128 bytes (4 times double4).
Atom::Atom |
( |
double3 |
position, |
|
|
double |
charge, |
|
|
double |
scalingVDW, |
|
|
double |
scalingCoulomb, |
|
|
std::uint32_t |
moleculeId, |
|
|
std::uint16_t |
type, |
|
|
std::uint8_t |
componentId, |
|
|
std::uint8_t |
groupId, |
|
|
std::uint8_t |
isFractional |
|
) |
| |
|
inline |
Constructs an Atom with specified parameters.
Initializes an Atom with the provided position, charge, scaling factors, molecule ID, type, component ID, and group ID.
- Parameters
-
position | The initial position of the atom. |
charge | The electric charge of the atom. |
scalingVDW | Scaling factor for van der Waals interactions. |
scalingCoulomb | Scaling factor for Coulomb interactions. |
moleculeId | Identifier for the molecule. |
type | Type identifier of the atom. |
componentId | Component identifier within the system. |
groupId | Group identifier, defaults to false. |
Atom::Atom |
( |
double3 |
position, |
|
|
double |
charge, |
|
|
double |
lambda, |
|
|
std::uint32_t |
moleculeId, |
|
|
std::uint16_t |
type, |
|
|
std::uint8_t |
componentId, |
|
|
std::uint8_t |
groupId, |
|
|
std::uint8_t |
isFractional |
|
) |
| |
|
inline |
Constructs an Atom with lambda-dependent scaling.
Initializes an Atom with position, charge, and scaling factors determined by the provided lambda value. Also sets molecule ID, type, component ID, and group ID.
- Parameters
-
position | The initial position of the atom. |
charge | The electric charge of the atom. |
lambda | The scaling parameter for interactions. |
moleculeId | Identifier for the molecule. |
type | Type identifier of the atom. |
componentId | Component identifier within the system. |
groupId | Group identifier, defaults to false. |