Propagates pressure-controlled dynamics with a Langevin piston. More...
#include <CudaLangevinPistonIntegrator.h>
Public Member Functions | |
| CudaLangevinPistonIntegrator (const double timeStep) | |
| Constructs an unattached Langevin-piston integrator. | |
| ~CudaLangevinPistonIntegrator (void) noexcept override | |
| Destroys the piston integrator and its RNG-state allocation. | |
| void | useNoseHooverThermostat (const bool usingNoseHooverThermostat) |
| Enables or disables Nose-Hoover temperature coupling. | |
| void | setReferenceTemperature (const double referenceTemperature) |
| Sets the reference temperature. | |
| void | setNoseHooverPistonMass (const double noseHooverPistonMass) |
| Sets the scalar Nose-Hoover coupling mass. | |
| void | setNoseHooverPistonVelocity (const double noseHooverPistonVelocity) |
| Sets the current Nose-Hoover extended-variable velocity. | |
| void | setNoseHooverPistonVelocityPrevious (const double noseHooverPistonVelocityPrevious) |
| Sets the previous Nose-Hoover extended-variable velocity. | |
| void | setNoseHooverPistonForce (const double noseHooverPistonForce) |
| Sets the current Nose-Hoover velocity-increment state. | |
| void | setNoseHooverPistonForcePrevious (const double noseHooverPistonForcePrevious) |
| Sets the previous Nose-Hoover velocity-increment state. | |
| void | setMaxPredictorCorrectorIterations (const int maxPredictorCorrectorIterations) |
| Sets the number of piston predictor-corrector iterations. | |
| void | useOldTemperature (const bool usingOldTemperature) |
| Selects the on-step temperature estimator. | |
| void | setReferencePressure (const std::vector< double > &referencePressure) |
| Sets the reference pressure tensor. | |
| void | setConstantSurfaceTension (const bool constantSurfaceTensionFlag) |
| Enables or disables the constant-surface-tension branch. | |
| void | setCrystalType (const CRYSTAL crystalType) |
| Selects the crystal symmetry and reallocates piston state. | |
| void | setLangevinPistonMass (const std::vector< double > &mass) |
| Sets the Langevin-piston masses. | |
| void | setLangevinPistonFrictionSeed (const std::uint64_t seed) |
| Sets the Langevin-piston RNG seed. | |
| void | setRngSequencePos (const unsigned long long int rngSequencePos) |
| Sets the piston RNG sequence position. | |
| void | setRngStates (const std::string &rngStateString) |
| Restores serialized piston RNG states. | |
| void | setLangevinPistonFriction (const double pgamma) |
| Sets the Langevin-piston friction coefficient. | |
| void | resetAverages (void) |
| Resets temperature and pressure running averages. | |
| double | getReferenceTemperature (void) const |
| Returns the reference temperature. | |
| bool | usingOldTemperature (void) const |
| Returns the native temperature-estimator selector. | |
| const CudaContainer< double > & | getNoseHooverPistonMass (void) const |
| Returns the scalar Nose-Hoover coupling-mass container. | |
| const CudaContainer< double > & | getNoseHooverPistonVelocity (void) const |
| Returns the current Nose-Hoover velocity container. | |
| const CudaContainer< double > & | getNoseHooverPistonVelocityPrevious (void) const |
| Returns the previous Nose-Hoover velocity container. | |
| const CudaContainer< double > & | getNoseHooverPistonForce (void) const |
| Returns the current Nose-Hoover increment container. | |
| const CudaContainer< double > & | getNoseHooverPistonForcePrevious (void) const |
| Returns the previous Nose-Hoover increment container. | |
| int | getMaxPredictorCorrectorIterations (void) const |
| Returns the piston predictor-corrector iteration count. | |
| const CudaContainer< double > & | getKineticEnergy (void) const |
| Returns both kinetic-energy estimators. | |
| const CudaContainer< double > & | getAverageTemperature (void) const |
| Returns both running-temperature estimators. | |
| const CudaContainer< double > & | getAverageOldTemperature (void) const |
| Returns the declared old-temperature average container. | |
| const CudaContainer< double > & | getReferencePressureTensor (void) const |
| Returns the reference pressure tensor. | |
| CRYSTAL | getCrystalType (void) const |
| Returns the selected crystal symmetry. | |
| const CudaContainer< double > & | getLangevinPistonMass (void) const |
| Returns the Langevin-piston mass array. | |
| const CudaContainer< double > & | getLangevinPistonOnStepPosition (void) const |
| Returns on-step piston positions. | |
| const CudaContainer< double > & | getLangevinPistonHalfStepPosition (void) const |
| Returns half-step piston positions. | |
| const CudaContainer< double > & | getLangevinPistonOnStepVelocity (void) const |
| Returns on-step piston velocities. | |
| const CudaContainer< double > & | getLangevinPistonHalfStepVelocity (void) const |
| Returns half-step piston velocity storage. | |
| const CudaContainer< double > & | getLangevinPistonDeltaPosition (void) const |
| Returns current piston position increments. | |
| const CudaContainer< double > & | getLangevinPistonDeltaPositionPrevious (void) const |
| Returns previous piston position increments. | |
| const CudaContainer< double > & | getLangevinPistonDeltaPositionPredicted (void) const |
| Returns predicted piston position increments. | |
| const CudaContainer< double > & | getLangevinPistonDeltaPressure (void) const |
| Returns piston delta-pressure values. | |
| const CudaContainer< double > & | getInstantaneousPressureTensor (void) const |
| Returns the instantaneous pressure tensor. | |
| const CudaContainer< double > & | getInstantaneousPressureScalar (void) const |
| Returns the instantaneous scalar pressure. | |
| const CudaContainer< double > & | getAveragePressureTensor (void) const |
| Returns the running-average pressure tensor. | |
| const CudaContainer< double > & | getAveragePressureScalar (void) const |
| Returns the running-average scalar pressure. | |
| std::uint64_t | getLangevinPistonFrictionSeed (void) const |
| Returns the piston RNG seed. | |
| unsigned long long int | getRngSequencePos (void) const |
| Returns the recorded piston RNG sequence position. | |
| std::string | getRngStates (void) const |
| Copies piston RNG state to an opaque string. | |
| CudaContainer< double > & | getNoseHooverPistonMass (void) |
| Returns mutable Nose-Hoover coupling-mass storage. | |
| CudaContainer< double > & | getNoseHooverPistonVelocity (void) |
| Returns mutable current Nose-Hoover velocity storage. | |
| CudaContainer< double > & | getNoseHooverPistonVelocityPrevious (void) |
| Returns mutable previous Nose-Hoover velocity storage. | |
| CudaContainer< double > & | getNoseHooverPistonForce (void) |
| Returns mutable current Nose-Hoover increment storage. | |
| CudaContainer< double > & | getNoseHooverPistonForcePrevious (void) |
| Returns mutable previous Nose-Hoover increment storage. | |
| CudaContainer< double > & | getKineticEnergy (void) |
| Returns mutable two-estimator kinetic-energy storage. | |
| CudaContainer< double > & | getAverageTemperature (void) |
| Returns mutable two-estimator running-temperature storage. | |
| CudaContainer< double > & | getAverageOldTemperature (void) |
| Returns the declared mutable old-temperature average container. | |
| double | getInstantaneousTemperature (void) |
| Computes the selected instantaneous temperature. | |
| CudaContainer< double > & | getReferencePressureTensor (void) |
| Returns mutable reference-pressure storage. | |
| CudaContainer< double > & | getLangevinPistonMass (void) |
| Returns mutable Langevin-piston mass storage. | |
| CudaContainer< double > & | getLangevinPistonOnStepPosition (void) |
| Returns mutable on-step piston-position storage. | |
| CudaContainer< double > & | getLangevinPistonHalfStepPosition (void) |
| Returns mutable half-step piston-position storage. | |
| CudaContainer< double > & | getLangevinPistonOnStepVelocity (void) |
| Returns mutable on-step piston-velocity storage. | |
| CudaContainer< double > & | getLangevinPistonHalfStepVelocity (void) |
| Returns mutable half-step piston-velocity storage. | |
| CudaContainer< double > & | getLangevinPistonDeltaPosition (void) |
| Returns mutable current piston-increment storage. | |
| CudaContainer< double > & | getLangevinPistonDeltaPositionPrevious (void) |
| Returns mutable previous piston-increment storage. | |
| CudaContainer< double > & | getLangevinPistonDeltaPositionPredicted (void) |
| Returns mutable predicted piston-increment storage. | |
| CudaContainer< double > & | getLangevinPistonDeltaPressure (void) |
| Returns mutable piston delta-pressure storage. | |
| CudaContainer< double > & | getInstantaneousPressureTensor (void) |
| Returns mutable instantaneous pressure-tensor storage. | |
| CudaContainer< double > & | getInstantaneousPressureScalar (void) |
| Returns mutable instantaneous scalar-pressure storage. | |
| CudaContainer< double > & | getAveragePressureTensor (void) |
| Returns mutable average pressure-tensor storage. | |
| CudaContainer< double > & | getAveragePressureScalar (void) |
| Returns mutable average scalar-pressure storage. | |
| double | getInstantaneousSurfaceTension (void) |
| Computes the instantaneous planar surface tension. | |
Public Member Functions inherited from CudaIntegrator | |
| CudaIntegrator (void) | |
| Constructs an unattached base integrator with no time step. | |
| CudaIntegrator (const double timeStep) | |
| Constructs an unattached integrator with a time step. | |
| CudaIntegrator (const double timeStep, const int debugPrintFrequency) | |
| Constructs an integrator with a time step and debug interval. | |
| virtual | ~CudaIntegrator (void) noexcept |
| Destroys the base integrator and its CUDA streams. | |
| double | getTimeStep (void) const |
| Returns the public integrator time step. | |
| void | setTimeStep (const double dt) |
| Sets the public integrator time step. | |
| virtual void | setCharmmContext (std::shared_ptr< CharmmContext > ctx) final |
| Attaches a context and initializes concrete integrator state. | |
| const std::shared_ptr< CharmmContext > | getCharmmContext (void) const |
| Returns the retained context from a const integrator. | |
| std::shared_ptr< CharmmContext > | getCharmmContext (void) |
| Returns the retained context from a mutable integrator. | |
| virtual void | initialize (void) final |
| Reinitializes concrete integrator state from the attached context. | |
| virtual void | initializeFromRestartFile (const std::filesystem::path &rstFilePath) final |
| Initializes concrete integrator state from a restart file. | |
| virtual void | propagateOneStep (void) final |
| Propagates one concrete dynamics step without base-loop bookkeeping. | |
| void | propagate (const int numSteps) |
| Propagates dynamics and invokes scheduled subscriber updates. | |
| void | setDebugPrintFrequency (const int freq) |
| Sets the concrete-integrator debug-calculation interval. | |
| void | setNonbondedListUpdateFrequency (const int freq) |
| Sets the nonbonded neighbor-list update interval. | |
| void | subscribe (std::shared_ptr< Subscriber > sub) |
| Attaches one subscriber and caches its reporting interval. | |
| void | subscribe (const std::vector< std::shared_ptr< Subscriber > > &sublist) |
| Attaches subscribers sequentially in vector order. | |
| void | unsubscribe (std::shared_ptr< Subscriber > sub) |
| Removes one subscriber and its cached reporting interval. | |
| void | unsubscribe (const std::vector< std::shared_ptr< Subscriber > > &sublist) |
| Removes subscribers sequentially in vector order. | |
| const std::vector< std::shared_ptr< Subscriber > > & | getSubscribers (void) const |
| Returns the attached subscriber array. | |
| std::vector< std::shared_ptr< Subscriber > > & | getSubscribers (void) |
| Returns mutable access to the attached subscriber array. | |
| const std::vector< int > & | getReportFreqList (void) const |
| Returns the cached subscriber-frequency array. | |
| std::vector< int > & | getReportFreqList (void) |
| Returns mutable access to cached subscriber frequencies. | |
| void | setRemoveCenterOfMassFrequency (const int freq) |
| Sets the center-of-mass-removal interval. | |
| const CudaContainer< double4 > & | getCoordsDelta (void) const |
| Returns the current half-step displacement container. | |
| CudaContainer< double4 > & | getCoordsDelta (void) |
| Returns mutable current half-step displacement storage. | |
| const CudaContainer< double4 > & | getCoordsDeltaPrevious (void) const |
| Returns the previous half-step displacement container. | |
| CudaContainer< double4 > & | getCoordsDeltaPrevious (void) |
| Returns mutable previous half-step displacement storage. | |
| virtual std::map< std::string, std::string > | getIntegratorDescriptors (void) |
| Returns key/value descriptors for the concrete integrator. | |
| int | getCurrentPropagatedStep (void) const |
| Returns the wrapped completed-step counter. | |
| unsigned long long int | getTotNumSteps (void) const |
| Returns the total number of requested propagation steps. | |
| int | getNumSteps (void) const |
| Returns the most recently requested propagation length. | |
Protected Member Functions | |
| void | initializeImpl (void) override |
| Allocates and initializes pressure-controlled state. | |
| void | initializeFromRestartFileImpl (const std::filesystem::path &rstFilePath) override |
| Restores pressure, crystal, displacement, and RNG state. | |
| void | propagateOneStepImpl (void) override |
| Executes one synchronized pressure-controlled step. | |
| void | setRngStateData (const unsigned long long int position, const std::vector< curandStatePhilox4_32_10_t > &states) |
| Copies decoded piston RNG state to device storage. | |
| double | computeNoseHooverPistonMass (void) |
| Computes the default numeric Nose-Hoover coupling mass. | |
| double | computeLangevinPistonMass (void) |
| Computes the default numeric Langevin-piston mass. | |
| void | allocateLangevinPistonVariables (void) |
| Allocates and resets every crystal-sized piston container. | |
| void | initializeRng (void) |
| Initializes one Philox state per piston degree of freedom. | |
| void | removeCenterOfMassMotion (void) |
| Removes mass-weighted center-of-mass displacement. | |
| void | alloc (const int n) |
Allocates raw device storage for n piston RNG states. | |
| void | dealloc (void) |
| Releases raw piston RNG-state storage. | |
Protected Member Functions inherited from CudaIntegrator | |
| void | requirePropagationReady (void) const |
| Validates shared state required for propagation. | |
| void | reportIfNeeded (const int istep) |
| Invokes subscribers scheduled for one local propagation step. | |
Protected Attributes | |
| bool | m_UsingNoseHooverThermostat |
| Selects whether predictor-corrector updates include Nose-Hoover. | |
| double | m_ReferenceTemperature |
| Stores the reference temperature in kelvin. | |
| CudaContainer< double > | m_NoseHooverPistonMass |
| Stores the one-element Nose-Hoover coupling mass. | |
| CudaContainer< double > | m_NoseHooverPistonVelocity |
| Stores the current one-element Nose-Hoover velocity. | |
| CudaContainer< double > | m_NoseHooverPistonVelocityPrevious |
| Stores the previous Nose-Hoover velocity. | |
| CudaContainer< double > | m_NoseHooverPistonForce |
| Stores the current Nose-Hoover velocity increment. | |
| CudaContainer< double > | m_NoseHooverPistonForcePrevious |
| Stores the previous Nose-Hoover velocity increment. | |
| CudaContainer< double4 > | m_CoordsDeltaPredicted |
| Stores one predicted displacement record per context atom. | |
| CudaContainer< double4 > | m_HolonomicConstraintForces |
| Stores per-atom holonomic-constraint forces. | |
| CudaContainer< double > | m_PressureReductionPartialSums |
| Stores component-major pressure-related reduction partial sums. | |
| CudaContainer< double > | m_HolonomicConstraintVirial |
| Stores the nine-element constraint virial tensor. | |
| CudaContainer< double > | m_KineticPressureTensor |
| Stores the nine-element kinetic pressure tensor. | |
| CudaContainer< double > | m_PressureTensor |
| Stores the instantaneous nine-element pressure tensor in atm. | |
| CudaContainer< double > | m_PressureScalar |
| Stores the instantaneous scalar pressure in atm. | |
| CudaContainer< double > | m_ReferencePressureTensor |
| Stores the nine-element reference pressure tensor in atm. | |
| CudaContainer< double > | m_DeltaPressureTensor |
| Stores pressure minus reference pressure in atm. | |
| CudaContainer< double > | m_DeltaKineticPressureTensor |
| Stores the iterative kinetic contribution to delta pressure. | |
| CudaContainer< double > | m_StaticDeltaPressureTensor |
| Stores the predictor-corrector-invariant delta-pressure part. | |
| CRYSTAL | m_CrystalType |
| Stores the configured crystal symmetry. | |
| int | m_LangevinPistonDegreesOfFreedom |
| Stores the active crystal degree-of-freedom count. | |
| CudaContainer< double > | m_LangevinPistonMass |
| Stores crystal-sized Langevin-piston masses. | |
| CudaContainer< double > | m_LangevinPistonInverseMass |
| Stores reciprocal piston masses, with zero preserved as zero. | |
| CudaContainer< double > | m_LangevinPistonOnStepPosition |
| Stores on-step piston positions in angstroms. | |
| CudaContainer< double > | m_LangevinPistonHalfStepPosition |
| Stores half-step piston positions in angstroms. | |
| CudaContainer< double > | m_LangevinPistonOnStepVelocity |
| Stores on-step piston velocities in angstroms per AKMA time. | |
| CudaContainer< double > | m_LangevinPistonHalfStepVelocity |
| Stores allocated half-step piston velocity values. | |
| CudaContainer< double > | m_LangevinPistonDeltaPosition |
| Stores current piston position increments in angstroms. | |
| CudaContainer< double > | m_LangevinPistonDeltaPositionPrevious |
| Stores previous piston position increments in angstroms. | |
| CudaContainer< double > | m_LangevinPistonDeltaPositionPredicted |
| Stores predicted piston position increments in angstroms. | |
| CudaContainer< double > | m_LangevinPistonDeltaPressure |
| Stores piston delta pressures in atmospheres per angstrom. | |
| double | m_Pgamma |
| Stores public piston friction in inverse picoseconds. | |
| double | m_Palpha |
| Stores the dimensionless BBK damping coefficient. | |
| double | m_Pbfact |
| Stores the time-step-derived BBK force factor. | |
| CudaContainer< double > | m_Prfwd |
| Stores crystal-sized stochastic forcing amplitudes. | |
| CudaContainer< double > | m_OnStepCrystalFactor |
| Stores three on-step crystal scaling factors. | |
| CudaContainer< double > | m_HalfStepCrystalFactor |
| Stores three half-step crystal scaling factors. | |
| std::uint64_t | m_Seed |
| Stores the dimensionless 64-bit Philox seed. | |
| unsigned long long int | m_RngSequencePos |
| Stores the recorded dimensionless Philox sequence position. | |
| curandStatePhilox4_32_10_t * | m_RngStates |
| Owns one raw device RNG state per crystal degree of freedom. | |
| bool | m_ConstantSurfaceTensionFlag |
| Selects the constant-surface-tension pressure branch. | |
| CudaContainer< double > | m_SurfaceTension |
| Stores the one-element target surface tension. | |
| int | m_MaxPredictorCorrectorIterations |
| Stores the positive predictor-corrector iteration count. | |
| int | m_AverageWindowSize |
| Stores the number of samples accumulated into running averages. | |
| CudaContainer< double > | m_KineticEnergy |
| Stores two kinetic-energy estimators in kcal/mol. | |
| CudaContainer< double > | m_KineticEnergyPartialSums |
| Stores per-block partial sums for both kinetic estimators. | |
| CudaContainer< double > | m_AverageTemperature |
| Stores two running-temperature estimators in kelvin. | |
| CudaContainer< double > | m_AveragePressureTensor |
| Stores the nine-element running-average pressure tensor in atm. | |
| CudaContainer< double > | m_AveragePressureScalar |
| Stores the running-average scalar pressure in atm. | |
| bool | m_UsingOldTemperature |
| Selects kinetic and temperature estimator element 1. | |
Protected Attributes inherited from CudaIntegrator | |
| double | m_TimeStep |
| Stores the internal time step in AKMA time. | |
| double | m_Timfac |
| Stores the picoseconds-to-AKMA-time conversion factor. | |
| int | m_DebugPrintFrequency |
| Stores the non-negative concrete debug-calculation interval. | |
| std::shared_ptr< CharmmContext > | m_Context |
| Retains the context attached to this integrator. | |
| int | m_StepsSinceNeighborListUpdate |
| Stores the current per-call neighbor-list scheduling counter. | |
| int | m_CurrentPropagatedStep |
| Stores the wrapped number of completed base-loop steps. | |
| unsigned long long int | m_TotNumSteps |
| Stores the accumulated number of requested propagation steps. | |
| int | m_NumSteps |
| Stores the most recently accepted propagation request length. | |
| std::shared_ptr< CudaHolonomicConstraint > | m_HolonomicConstraint |
| Retains the optional holonomic-constraint helper. | |
| CudaContainer< double4 > | m_CoordsRef |
| Stores per-atom reference coordinates used by concrete steps. | |
| CudaContainer< double4 > | m_CoordsDelta |
| Stores current half-step displacements. | |
| CudaContainer< double4 > | m_CoordsDeltaPrevious |
| Stores previous half-step displacements. | |
| std::shared_ptr< cudaStream_t > | m_IntegratorStream |
| Owns the primary CUDA stream used by concrete integrator work. | |
| std::shared_ptr< cudaStream_t > | m_IntegratorMemcpyStream |
| Owns a reserved CUDA memcpy stream. | |
| bool | m_UsingHolonomicConstraints |
| Stores the constraint setting captured during context attachment. | |
| std::vector< std::shared_ptr< Subscriber > > | m_Subscribers |
| Retains subscribers in callback order. | |
| std::vector< int > | m_ReportFreqList |
| Stores the frequency snapshot for each attached subscriber. | |
| int | m_NonbondedListUpdateFrequency |
| Stores the positive nonbonded-list update interval in steps. | |
| int | m_RemoveCenterOfMassFrequency |
| Stores the positive center-of-mass-removal interval in steps. | |
| std::string | m_IntegratorTypeName |
| Stores the concrete integrator label used by subscribers. | |
Propagates pressure-controlled dynamics with a Langevin piston.
The integrator maintains one to three crystal degrees of freedom, a predictor-corrector pressure loop, optional Nose-Hoover temperature coupling, one Philox RNG state per crystal degree of freedom, pressure tensors, and running temperature and pressure averages.
Select a supported CRYSTAL before attaching the context.
| CudaLangevinPistonIntegrator::CudaLangevinPistonIntegrator | ( | const double | timeStep | ) |
Constructs an unattached Langevin-piston integrator.
| [in] | timeStep | Finite positive time step in picoseconds. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if timeStep is non-finite or not positive. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if stream or fixed-state allocation fails. |
| std::bad_alloc | If host or stream-owner allocation fails. |
| std::system_error | If the platform random source used for the initial seed fails. |
|
overridenoexcept |
Destroys the piston integrator and its RNG-state allocation.
CUDA cleanup failures are discarded and no exception escapes.
|
protected |
Allocates raw device storage for n piston RNG states.
| [in] | n | Number of states. |
|
protected |
Allocates and resets every crystal-sized piston container.
|
protected |
Computes the default numeric Langevin-piston mass.
0.02 times the sum of context atom masses.
|
protected |
Computes the default numeric Nose-Hoover coupling mass.
0.2 times the sum of context atom masses. | CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageOldTemperature | ( | void | ) |
Returns the declared mutable old-temperature average container.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageOldTemperature | ( | void | ) | const |
Returns the declared old-temperature average container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureScalar | ( | void | ) |
Returns mutable average scalar-pressure storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureScalar | ( | void | ) | const |
Returns the running-average scalar pressure.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureTensor | ( | void | ) |
Returns mutable average pressure-tensor storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureTensor | ( | void | ) | const |
Returns the running-average pressure tensor.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageTemperature | ( | void | ) |
Returns mutable two-estimator running-temperature storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageTemperature | ( | void | ) | const |
Returns both running-temperature estimators.
getKineticEnergy(). | CRYSTAL CudaLangevinPistonIntegrator::getCrystalType | ( | void | ) | const |
Returns the selected crystal symmetry.
CRYSTAL::NONE before configuration, or the active supported crystal value. | CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureScalar | ( | void | ) |
Returns mutable instantaneous scalar-pressure storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureScalar | ( | void | ) | const |
Returns the instantaneous scalar pressure.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureTensor | ( | void | ) |
Returns mutable instantaneous pressure-tensor storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureTensor | ( | void | ) | const |
Returns the instantaneous pressure tensor.
| double CudaLangevinPistonIntegrator::getInstantaneousSurfaceTension | ( | void | ) |
Computes the instantaneous planar surface tension.
0.5 * Lz * (Pzz - 0.5 * (Pxx + Pyy)) converted to dyne per centimeter.| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no context is attached. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if the pressure tensor cannot be transferred to the host. |
| double CudaLangevinPistonIntegrator::getInstantaneousTemperature | ( | void | ) |
Computes the selected instantaneous temperature.
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no context is attached. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if kinetic energy cannot be transferred to the host. |
| CudaContainer< double > & CudaLangevinPistonIntegrator::getKineticEnergy | ( | void | ) |
Returns mutable two-estimator kinetic-energy storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getKineticEnergy | ( | void | ) | const |
Returns both kinetic-energy estimators.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPosition | ( | void | ) |
Returns mutable current piston-increment storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPosition | ( | void | ) | const |
Returns current piston position increments.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPredicted | ( | void | ) |
Returns mutable predicted piston-increment storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPredicted | ( | void | ) | const |
Returns predicted piston position increments.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPrevious | ( | void | ) |
Returns mutable previous piston-increment storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPrevious | ( | void | ) | const |
Returns previous piston position increments.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPressure | ( | void | ) |
Returns mutable piston delta-pressure storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPressure | ( | void | ) | const |
Returns piston delta-pressure values.
| std::uint64_t CudaLangevinPistonIntegrator::getLangevinPistonFrictionSeed | ( | void | ) | const |
Returns the piston RNG seed.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepPosition | ( | void | ) |
Returns mutable half-step piston-position storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepPosition | ( | void | ) | const |
Returns half-step piston positions.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepVelocity | ( | void | ) |
Returns mutable half-step piston-velocity storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepVelocity | ( | void | ) | const |
Returns half-step piston velocity storage.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonMass | ( | void | ) |
Returns mutable Langevin-piston mass storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonMass | ( | void | ) | const |
Returns the Langevin-piston mass array.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepPosition | ( | void | ) |
Returns mutable on-step piston-position storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepPosition | ( | void | ) | const |
Returns on-step piston positions.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepVelocity | ( | void | ) |
Returns mutable on-step piston-velocity storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepVelocity | ( | void | ) | const |
Returns on-step piston velocities.
| int CudaLangevinPistonIntegrator::getMaxPredictorCorrectorIterations | ( | void | ) | const |
Returns the piston predictor-corrector iteration count.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForce | ( | void | ) |
Returns mutable current Nose-Hoover increment storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForce | ( | void | ) | const |
Returns the current Nose-Hoover increment container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForcePrevious | ( | void | ) |
Returns mutable previous Nose-Hoover increment storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForcePrevious | ( | void | ) | const |
Returns the previous Nose-Hoover increment container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonMass | ( | void | ) |
Returns mutable Nose-Hoover coupling-mass storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonMass | ( | void | ) | const |
Returns the scalar Nose-Hoover coupling-mass container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocity | ( | void | ) |
Returns mutable current Nose-Hoover velocity storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocity | ( | void | ) | const |
Returns the current Nose-Hoover velocity container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocityPrevious | ( | void | ) |
Returns mutable previous Nose-Hoover velocity storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocityPrevious | ( | void | ) | const |
Returns the previous Nose-Hoover velocity container.
| CudaContainer< double > & CudaLangevinPistonIntegrator::getReferencePressureTensor | ( | void | ) |
Returns mutable reference-pressure storage.
| const CudaContainer< double > & CudaLangevinPistonIntegrator::getReferencePressureTensor | ( | void | ) | const |
Returns the reference pressure tensor.
| double CudaLangevinPistonIntegrator::getReferenceTemperature | ( | void | ) | const |
Returns the reference temperature.
| unsigned long long int CudaLangevinPistonIntegrator::getRngSequencePos | ( | void | ) | const |
Returns the recorded piston RNG sequence position.
| std::string CudaLangevinPistonIntegrator::getRngStates | ( | void | ) | const |
Copies piston RNG state to an opaque string.
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no crystal is configured or RNG state is absent. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if stream synchronization or device-to-host copying fails. |
| std::bad_alloc | If host state or result allocation fails. |
|
overrideprotectedvirtual |
Restores pressure, crystal, displacement, and RNG state.
| [in] | rstFilePath | Borrowed restart-file path. The path is not canonicalized or retained. |
Reimplemented from CudaIntegrator.
| void CudaLangevinPistonIntegrator::resetAverages | ( | void | ) |
Resets temperature and pressure running averages.
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if any running average cannot be reset on the device. |
| void CudaLangevinPistonIntegrator::setConstantSurfaceTension | ( | const bool | constantSurfaceTensionFlag | ) |
Enables or disables the constant-surface-tension branch.
| [in] | constantSurfaceTensionFlag | true enables the branch and false disables it. |
| void CudaLangevinPistonIntegrator::setCrystalType | ( | const CRYSTAL | crystalType | ) |
Selects the crystal symmetry and reallocates piston state.
| [in] | crystalType | CRYSTAL::CUBIC, CRYSTAL::TETRAGONAL, or CRYSTAL::ORTHORHOMBIC. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument for CRYSTAL::NONE or another unsupported value. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if crystal-dependent containers cannot be allocated, initialized, or transferred. |
| std::bad_alloc | If host state allocation fails. |
| void CudaLangevinPistonIntegrator::setLangevinPistonFriction | ( | const double | pgamma | ) |
Sets the Langevin-piston friction coefficient.
| [in] | pgamma | Finite non-negative friction in inverse picoseconds. |
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if pgamma is non-finite or negative. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if stochastic forcing factors cannot be transferred to device storage. |
| void CudaLangevinPistonIntegrator::setLangevinPistonFrictionSeed | ( | const std::uint64_t | seed | ) |
Sets the Langevin-piston RNG seed.
| [in] | seed | Dimensionless 64-bit seed. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if a selected crystal requires RNG allocation or initialization and CUDA work fails. |
| void CudaLangevinPistonIntegrator::setLangevinPistonMass | ( | const std::vector< double > & | mass | ) |
Sets the Langevin-piston masses.
| [in] | mass | Borrowed values copied in crystal-degree-of-freedom order. The vector must have exactly the active degree-of-freedom count and every value must be finite and non-negative. The exact dimensional convention is not established by the repository. |
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the length is wrong or a value is non-finite or negative. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if masses, inverse masses, or derived friction factors cannot be transferred. |
| void CudaLangevinPistonIntegrator::setMaxPredictorCorrectorIterations | ( | const int | maxPredictorCorrectorIterations | ) |
Sets the number of piston predictor-corrector iterations.
| [in] | maxPredictorCorrectorIterations | Positive dimensionless iteration count. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is not positive. |
| void CudaLangevinPistonIntegrator::setNoseHooverPistonForce | ( | const double | noseHooverPistonForce | ) |
Sets the current Nose-Hoover velocity-increment state.
| [in] | noseHooverPistonForce | Finite native increment value. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is non-finite. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if device update fails. |
| void CudaLangevinPistonIntegrator::setNoseHooverPistonForcePrevious | ( | const double | noseHooverPistonForcePrevious | ) |
Sets the previous Nose-Hoover velocity-increment state.
| [in] | noseHooverPistonForcePrevious | Finite native previous-increment value. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is non-finite. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if device update fails. |
| void CudaLangevinPistonIntegrator::setNoseHooverPistonMass | ( | const double | noseHooverPistonMass | ) |
Sets the scalar Nose-Hoover coupling mass.
| [in] | noseHooverPistonMass | Finite non-negative native coupling-mass value. The repository does not establish its public dimensional convention. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is non-finite or negative. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if the scalar cannot be copied to device storage. |
| void CudaLangevinPistonIntegrator::setNoseHooverPistonVelocity | ( | const double | noseHooverPistonVelocity | ) |
Sets the current Nose-Hoover extended-variable velocity.
| [in] | noseHooverPistonVelocity | Finite native extended-state value. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is non-finite. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if device update fails. |
| void CudaLangevinPistonIntegrator::setNoseHooverPistonVelocityPrevious | ( | const double | noseHooverPistonVelocityPrevious | ) |
Sets the previous Nose-Hoover extended-variable velocity.
| [in] | noseHooverPistonVelocityPrevious | Finite native previous-state value. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the value is non-finite. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if device update fails. |
| void CudaLangevinPistonIntegrator::setReferencePressure | ( | const std::vector< double > & | referencePressure | ) |
Sets the reference pressure tensor.
| [in] | referencePressure | Borrowed vector containing exactly nine finite row-major values in atmospheres, ordered xx, xy, xz, yx, yy, yz, zx, zy, zz. Values are copied. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the vector does not contain exactly nine values or any value is non-finite. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if the copied tensor cannot be transferred to device storage. |
| void CudaLangevinPistonIntegrator::setReferenceTemperature | ( | const double | referenceTemperature | ) |
Sets the reference temperature.
| [in] | referenceTemperature | Finite non-negative temperature in kelvin. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if referenceTemperature is non-finite or negative. |
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if a selected crystal has inconsistent piston state while friction factors are recomputed. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if updated stochastic factors cannot be transferred. |
| void CudaLangevinPistonIntegrator::setRngSequencePos | ( | const unsigned long long int | rngSequencePos | ) |
Sets the piston RNG sequence position.
| [in] | rngSequencePos | Dimensionless Philox sequence position. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if a selected crystal requires RNG allocation or initialization and CUDA work fails. |
|
protected |
Copies decoded piston RNG state to device storage.
| [in] | position | Dimensionless sequence position. |
| [in] | states | Borrowed states copied during the call. |
| void CudaLangevinPistonIntegrator::setRngStates | ( | const std::string & | rngStateString | ) |
Restores serialized piston RNG states.
| [in] | rngStateString | Borrowed opaque string produced by getRngStates(). |
| ApoCharmmError | With code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected. |
| ApoCharmmError | With code ApoCharmmErrorCode::InvalidArgument if the decoded state count does not equal the active piston degree-of-freedom count. |
| ApoCharmmError | With code ApoCharmmErrorCode::Runtime if the string cannot be decoded. |
| ApoCharmmError | With code ApoCharmmErrorCode::Cuda if device allocation or transfer fails. |
| void CudaLangevinPistonIntegrator::useNoseHooverThermostat | ( | const bool | usingNoseHooverThermostat | ) |
Enables or disables Nose-Hoover temperature coupling.
| [in] | usingNoseHooverThermostat | true includes the Nose-Hoover extended variable in predictor-corrector updates; false omits it. |
| void CudaLangevinPistonIntegrator::useOldTemperature | ( | const bool | usingOldTemperature | ) |
Selects the on-step temperature estimator.
| [in] | usingOldTemperature | true selects kinetic-energy element 1 for native feedback and instantaneous temperature; false selects element 0. |
| bool CudaLangevinPistonIntegrator::usingOldTemperature | ( | void | ) | const |
Returns the native temperature-estimator selector.
true for element 1 and false for element 0.
|
protected |
Stores allocated half-step piston velocity values.
Current propagation does not update this container after reset.
|
protected |
Stores component-major pressure-related reduction partial sums.
For a reduction with numBlocks first-pass blocks, component c and block b are stored at c * numBlocks + b. The same workspace is reused sequentially for the constraint virial, average kinetic pressure, and delta kinetic pressure.
|
protected |
Stores the one-element target surface tension.
The current constructor allocates but does not initialize this value, and no public target setter exists.