apoCHARMM 1.0.0
High-performance molecular dynamics simulations on GPUs
 
Loading...
Searching...
No Matches
CudaLangevinPistonIntegrator Class Reference

Propagates pressure-controlled dynamics with a Langevin piston. More...

#include <CudaLangevinPistonIntegrator.h>

Inheritance diagram for CudaLangevinPistonIntegrator:
CudaIntegrator

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< CharmmContextgetCharmmContext (void) const
 Returns the retained context from a const integrator.
 
std::shared_ptr< CharmmContextgetCharmmContext (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< CharmmContextm_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.
 

Detailed Description

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.

Warning
Treat the class as non-copyable. It owns a raw device RNG-state allocation in addition to base CUDA streams.
See also
cuda_integrators

Constructor & Destructor Documentation

◆ CudaLangevinPistonIntegrator()

CudaLangevinPistonIntegrator::CudaLangevinPistonIntegrator ( const double  timeStep)

Constructs an unattached Langevin-piston integrator.

Parameters
[in]timeStepFinite positive time step in picoseconds.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if timeStep is non-finite or not positive.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if stream or fixed-state allocation fails.
std::bad_allocIf host or stream-owner allocation fails.
std::system_errorIf the platform random source used for the initial seed fails.
Postcondition
Nose-Hoover temperature coupling is enabled, the reference temperature is 300 K, the reference pressure is the 3-by-3 identity tensor in atmospheres, no crystal is selected, the maximum predictor-corrector count is three, and running averages are zero.

◆ ~CudaLangevinPistonIntegrator()

CudaLangevinPistonIntegrator::~CudaLangevinPistonIntegrator ( void  )
overridenoexcept

Destroys the piston integrator and its RNG-state allocation.

CUDA cleanup failures are discarded and no exception escapes.

Member Function Documentation

◆ alloc()

void CudaLangevinPistonIntegrator::alloc ( const int  n)
protected

Allocates raw device storage for n piston RNG states.

Parameters
[in]nNumber of states.

◆ allocateLangevinPistonVariables()

void CudaLangevinPistonIntegrator::allocateLangevinPistonVariables ( void  )
protected

Allocates and resets every crystal-sized piston container.

Precondition
The piston degree-of-freedom count is one, two, or three.

◆ computeLangevinPistonMass()

double CudaLangevinPistonIntegrator::computeLangevinPistonMass ( void  )
protected

Computes the default numeric Langevin-piston mass.

Returns
0.02 times the sum of context atom masses.

◆ computeNoseHooverPistonMass()

double CudaLangevinPistonIntegrator::computeNoseHooverPistonMass ( void  )
protected

Computes the default numeric Nose-Hoover coupling mass.

Returns
0.2 times the sum of context atom masses.

◆ getAverageOldTemperature() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageOldTemperature ( void  )

Returns the declared mutable old-temperature average container.

Returns
A borrowed mutable container alias.
Warning
The current repository declares this function but provides no definition. ODR-use causes a link failure.

◆ getAverageOldTemperature() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageOldTemperature ( void  ) const

Returns the declared old-temperature average container.

Returns
A borrowed const container alias.
Warning
The current repository declares this function but provides no definition. ODR-use causes a link failure.

◆ getAveragePressureScalar() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureScalar ( void  )

Returns mutable average scalar-pressure storage.

Returns
Borrowed mutable alias to one atmosphere value.

◆ getAveragePressureScalar() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureScalar ( void  ) const

Returns the running-average scalar pressure.

Returns
Borrowed const alias to one value in atmospheres.

◆ getAveragePressureTensor() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureTensor ( void  )

Returns mutable average pressure-tensor storage.

Returns
Borrowed mutable alias to nine row-major atmosphere values.

◆ getAveragePressureTensor() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getAveragePressureTensor ( void  ) const

Returns the running-average pressure tensor.

Returns
Borrowed const alias to nine row-major values in atmospheres.

◆ getAverageTemperature() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageTemperature ( void  )

Returns mutable two-estimator running-temperature storage.

Returns
Borrowed mutable alias to the two-element container.
Warning
Preserve the estimator layout.

◆ getAverageTemperature() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getAverageTemperature ( void  ) const

Returns both running-temperature estimators.

Returns
Borrowed const alias to a two-element container in kelvin with the same estimator order as getKineticEnergy().

◆ getCrystalType()

CRYSTAL CudaLangevinPistonIntegrator::getCrystalType ( void  ) const

Returns the selected crystal symmetry.

Returns
CRYSTAL::NONE before configuration, or the active supported crystal value.

◆ getInstantaneousPressureScalar() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureScalar ( void  )

Returns mutable instantaneous scalar-pressure storage.

Returns
Borrowed mutable alias to one atmosphere value.

◆ getInstantaneousPressureScalar() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureScalar ( void  ) const

Returns the instantaneous scalar pressure.

Returns
Borrowed const alias to one value in atmospheres.

◆ getInstantaneousPressureTensor() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureTensor ( void  )

Returns mutable instantaneous pressure-tensor storage.

Returns
Borrowed mutable alias to nine row-major atmosphere values.

◆ getInstantaneousPressureTensor() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getInstantaneousPressureTensor ( void  ) const

Returns the instantaneous pressure tensor.

Returns
Borrowed const alias to nine row-major values in atmospheres.

◆ getInstantaneousSurfaceTension()

double CudaLangevinPistonIntegrator::getInstantaneousSurfaceTension ( void  )

Computes the instantaneous planar surface tension.

Returns
0.5 * Lz * (Pzz - 0.5 * (Pxx + Pyy)) converted to dyne per centimeter.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no context is attached.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if the pressure tensor cannot be transferred to the host.

◆ getInstantaneousTemperature()

double CudaLangevinPistonIntegrator::getInstantaneousTemperature ( void  )

Computes the selected instantaneous temperature.

Returns
Kinetic-energy element 1 in kelvin when old-temperature mode is active, or element 0 in kelvin otherwise.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no context is attached.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if kinetic energy cannot be transferred to the host.

◆ getKineticEnergy() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getKineticEnergy ( void  )

Returns mutable two-estimator kinetic-energy storage.

Returns
Borrowed mutable alias to the two-element container.
Warning
Preserve the estimator layout.

◆ getKineticEnergy() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getKineticEnergy ( void  ) const

Returns both kinetic-energy estimators.

Returns
Borrowed const alias to a two-element container in kilocalories per mole. Element 0 is the three-point estimator and element 1 is the on-step estimator.

◆ getLangevinPistonDeltaPosition() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPosition ( void  )

Returns mutable current piston-increment storage.

Returns
Borrowed mutable alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPosition() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPosition ( void  ) const

Returns current piston position increments.

Returns
Borrowed const alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPositionPredicted() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPredicted ( void  )

Returns mutable predicted piston-increment storage.

Returns
Borrowed mutable alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPositionPredicted() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPredicted ( void  ) const

Returns predicted piston position increments.

Returns
Borrowed const alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPositionPrevious() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPrevious ( void  )

Returns mutable previous piston-increment storage.

Returns
Borrowed mutable alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPositionPrevious() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPositionPrevious ( void  ) const

Returns previous piston position increments.

Returns
Borrowed const alias to angstrom-valued increments.

◆ getLangevinPistonDeltaPressure() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPressure ( void  )

Returns mutable piston delta-pressure storage.

Returns
Borrowed mutable alias to atmosphere-per-angstrom values.

◆ getLangevinPistonDeltaPressure() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonDeltaPressure ( void  ) const

Returns piston delta-pressure values.

Returns
Borrowed const alias to one, two, or three values in atmospheres per angstrom.

◆ getLangevinPistonFrictionSeed()

std::uint64_t CudaLangevinPistonIntegrator::getLangevinPistonFrictionSeed ( void  ) const

Returns the piston RNG seed.

Returns
The dimensionless 64-bit seed.

◆ getLangevinPistonHalfStepPosition() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepPosition ( void  )

Returns mutable half-step piston-position storage.

Returns
Borrowed mutable alias to angstrom-valued positions.

◆ getLangevinPistonHalfStepPosition() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepPosition ( void  ) const

Returns half-step piston positions.

Returns
Borrowed const alias to one, two, or three values in angstroms.

◆ getLangevinPistonHalfStepVelocity() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepVelocity ( void  )

Returns mutable half-step piston-velocity storage.

Returns
Borrowed mutable alias to the allocated crystal-sized container.
Warning
The current propagation path does not update this container.

◆ getLangevinPistonHalfStepVelocity() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonHalfStepVelocity ( void  ) const

Returns half-step piston velocity storage.

Returns
Borrowed const alias to one, two, or three values.
Warning
The current propagation path allocates and zeroes this container but does not update it.

◆ getLangevinPistonMass() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonMass ( void  )

Returns mutable Langevin-piston mass storage.

Returns
Borrowed mutable alias in active crystal-degree-of-freedom order.
Warning
Preserve the active length and matching inverse-mass state.

◆ getLangevinPistonMass() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonMass ( void  ) const

Returns the Langevin-piston mass array.

Returns
Borrowed const alias with one, two, or three values in active crystal-degree-of-freedom order, or an empty container before crystal configuration.

◆ getLangevinPistonOnStepPosition() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepPosition ( void  )

Returns mutable on-step piston-position storage.

Returns
Borrowed mutable alias to angstrom-valued positions.

◆ getLangevinPistonOnStepPosition() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepPosition ( void  ) const

Returns on-step piston positions.

Returns
Borrowed const alias to one, two, or three values in angstroms.

◆ getLangevinPistonOnStepVelocity() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepVelocity ( void  )

Returns mutable on-step piston-velocity storage.

Returns
Borrowed mutable alias to values in angstroms per AKMA time.

◆ getLangevinPistonOnStepVelocity() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getLangevinPistonOnStepVelocity ( void  ) const

Returns on-step piston velocities.

Returns
Borrowed const alias to one, two, or three values in angstroms per AKMA time.

◆ getMaxPredictorCorrectorIterations()

int CudaLangevinPistonIntegrator::getMaxPredictorCorrectorIterations ( void  ) const

Returns the piston predictor-corrector iteration count.

Returns
A positive dimensionless count.

◆ getNoseHooverPistonForce() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForce ( void  )

Returns mutable current Nose-Hoover increment storage.

Returns
Borrowed mutable alias to the one-element container.
Warning
Preserve its one-element shape and host/device coherence.

◆ getNoseHooverPistonForce() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForce ( void  ) const

Returns the current Nose-Hoover increment container.

Returns
Borrowed const alias to a one-element container.

◆ getNoseHooverPistonForcePrevious() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForcePrevious ( void  )

Returns mutable previous Nose-Hoover increment storage.

Returns
Borrowed mutable alias to the one-element container.
Warning
Preserve its one-element shape and host/device coherence.

◆ getNoseHooverPistonForcePrevious() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonForcePrevious ( void  ) const

Returns the previous Nose-Hoover increment container.

Returns
Borrowed const alias to a one-element container.

◆ getNoseHooverPistonMass() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonMass ( void  )

Returns mutable Nose-Hoover coupling-mass storage.

Returns
Borrowed mutable alias to the one-element container.
Warning
Preserve its one-element shape and host/device coherence.

◆ getNoseHooverPistonMass() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonMass ( void  ) const

Returns the scalar Nose-Hoover coupling-mass container.

Returns
Borrowed const alias to a one-element container.

◆ getNoseHooverPistonVelocity() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocity ( void  )

Returns mutable current Nose-Hoover velocity storage.

Returns
Borrowed mutable alias to the one-element container.
Warning
Preserve its one-element shape and host/device coherence.

◆ getNoseHooverPistonVelocity() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocity ( void  ) const

Returns the current Nose-Hoover velocity container.

Returns
Borrowed const alias to a one-element container.

◆ getNoseHooverPistonVelocityPrevious() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocityPrevious ( void  )

Returns mutable previous Nose-Hoover velocity storage.

Returns
Borrowed mutable alias to the one-element container.
Warning
Preserve its one-element shape and host/device coherence.

◆ getNoseHooverPistonVelocityPrevious() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getNoseHooverPistonVelocityPrevious ( void  ) const

Returns the previous Nose-Hoover velocity container.

Returns
Borrowed const alias to a one-element container.

◆ getReferencePressureTensor() [1/2]

CudaContainer< double > & CudaLangevinPistonIntegrator::getReferencePressureTensor ( void  )

Returns mutable reference-pressure storage.

Returns
Borrowed mutable alias to nine row-major atmosphere values.
Warning
Preserve the nine-element shape and host/device coherence.

◆ getReferencePressureTensor() [2/2]

const CudaContainer< double > & CudaLangevinPistonIntegrator::getReferencePressureTensor ( void  ) const

Returns the reference pressure tensor.

Returns
Borrowed const alias to nine row-major values in atmospheres.

◆ getReferenceTemperature()

double CudaLangevinPistonIntegrator::getReferenceTemperature ( void  ) const

Returns the reference temperature.

Returns
The stored temperature in kelvin.

◆ getRngSequencePos()

unsigned long long int CudaLangevinPistonIntegrator::getRngSequencePos ( void  ) const

Returns the recorded piston RNG sequence position.

Returns
A dimensionless position advanced once per predictor-corrector iteration.

◆ getRngStates()

std::string CudaLangevinPistonIntegrator::getRngStates ( void  ) const

Copies piston RNG state to an opaque string.

Returns
A newly allocated string containing the position and one Philox state per active crystal degree of freedom.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no crystal is configured or RNG state is absent.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if stream synchronization or device-to-host copying fails.
std::bad_allocIf host state or result allocation fails.

◆ initializeFromRestartFileImpl()

void CudaLangevinPistonIntegrator::initializeFromRestartFileImpl ( const std::filesystem::path &  rstFilePath)
overrideprotectedvirtual

Restores pressure, crystal, displacement, and RNG state.

Parameters
[in]rstFilePathBorrowed restart-file path. The path is not canonicalized or retained.

Reimplemented from CudaIntegrator.

◆ resetAverages()

void CudaLangevinPistonIntegrator::resetAverages ( void  )

Resets temperature and pressure running averages.

Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if any running average cannot be reset on the device.
Postcondition
The sample count, both temperature values, all nine pressure-tensor values, and the scalar pressure average are zero.

◆ setConstantSurfaceTension()

void CudaLangevinPistonIntegrator::setConstantSurfaceTension ( const bool  constantSurfaceTensionFlag)

Enables or disables the constant-surface-tension branch.

Parameters
[in]constantSurfaceTensionFlagtrue enables the branch and false disables it.
Warning
The current public API has no target-surface-tension setter, and the target container is not initialized after allocation. Do not enable this mode until that implementation defect is corrected.

◆ setCrystalType()

void CudaLangevinPistonIntegrator::setCrystalType ( const CRYSTAL  crystalType)

Selects the crystal symmetry and reallocates piston state.

Parameters
[in]crystalTypeCRYSTAL::CUBIC, CRYSTAL::TETRAGONAL, or CRYSTAL::ORTHORHOMBIC.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument for CRYSTAL::NONE or another unsupported value.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if crystal-dependent containers cannot be allocated, initialized, or transferred.
std::bad_allocIf host state allocation fails.
Postcondition
The piston degree-of-freedom count is one, two, or three; every crystal-dependent piston array has that length and has been reset.
If a context is already attached, a default mass is computed from its atom masses.
Warning
Previously borrowed piston-container references and device pointers can be invalidated.

◆ setLangevinPistonFriction()

void CudaLangevinPistonIntegrator::setLangevinPistonFriction ( const double  pgamma)

Sets the Langevin-piston friction coefficient.

Parameters
[in]pgammaFinite non-negative friction in inverse picoseconds.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected.
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if pgamma is non-finite or negative.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if stochastic forcing factors cannot be transferred to device storage.

◆ setLangevinPistonFrictionSeed()

void CudaLangevinPistonIntegrator::setLangevinPistonFrictionSeed ( const std::uint64_t  seed)

Sets the Langevin-piston RNG seed.

Parameters
[in]seedDimensionless 64-bit seed.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if a selected crystal requires RNG allocation or initialization and CUDA work fails.
Postcondition
The existing sequence position is preserved.

◆ setLangevinPistonMass()

void CudaLangevinPistonIntegrator::setLangevinPistonMass ( const std::vector< double > &  mass)

Sets the Langevin-piston masses.

Parameters
[in]massBorrowed 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.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected.
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the length is wrong or a value is non-finite or negative.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if masses, inverse masses, or derived friction factors cannot be transferred.
Postcondition
A zero mass stores an inverse mass of zero and disables motion of the corresponding piston degree of freedom.

◆ setMaxPredictorCorrectorIterations()

void CudaLangevinPistonIntegrator::setMaxPredictorCorrectorIterations ( const int  maxPredictorCorrectorIterations)

Sets the number of piston predictor-corrector iterations.

Parameters
[in]maxPredictorCorrectorIterationsPositive dimensionless iteration count.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is not positive.
Note
One propagated step advances the recorded piston RNG sequence position once per configured iteration.

◆ setNoseHooverPistonForce()

void CudaLangevinPistonIntegrator::setNoseHooverPistonForce ( const double  noseHooverPistonForce)

Sets the current Nose-Hoover velocity-increment state.

Parameters
[in]noseHooverPistonForceFinite native increment value.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is non-finite.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if device update fails.
Note
The propagation kernel stores a velocity increment despite the historical “force” name.

◆ setNoseHooverPistonForcePrevious()

void CudaLangevinPistonIntegrator::setNoseHooverPistonForcePrevious ( const double  noseHooverPistonForcePrevious)

Sets the previous Nose-Hoover velocity-increment state.

Parameters
[in]noseHooverPistonForcePreviousFinite native previous-increment value.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is non-finite.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if device update fails.

◆ setNoseHooverPistonMass()

void CudaLangevinPistonIntegrator::setNoseHooverPistonMass ( const double  noseHooverPistonMass)

Sets the scalar Nose-Hoover coupling mass.

Parameters
[in]noseHooverPistonMassFinite non-negative native coupling-mass value. The repository does not establish its public dimensional convention.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is non-finite or negative.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if the scalar cannot be copied to device storage.
Warning
Zero is currently accepted, but propagation divides by this value when Nose-Hoover temperature coupling is enabled.

◆ setNoseHooverPistonVelocity()

void CudaLangevinPistonIntegrator::setNoseHooverPistonVelocity ( const double  noseHooverPistonVelocity)

Sets the current Nose-Hoover extended-variable velocity.

Parameters
[in]noseHooverPistonVelocityFinite native extended-state value.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is non-finite.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if device update fails.

◆ setNoseHooverPistonVelocityPrevious()

void CudaLangevinPistonIntegrator::setNoseHooverPistonVelocityPrevious ( const double  noseHooverPistonVelocityPrevious)

Sets the previous Nose-Hoover extended-variable velocity.

Parameters
[in]noseHooverPistonVelocityPreviousFinite native previous-state value.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the value is non-finite.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if device update fails.

◆ setReferencePressure()

void CudaLangevinPistonIntegrator::setReferencePressure ( const std::vector< double > &  referencePressure)

Sets the reference pressure tensor.

Parameters
[in]referencePressureBorrowed vector containing exactly nine finite row-major values in atmospheres, ordered xx, xy, xz, yx, yy, yz, zx, zy, zz. Values are copied.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the vector does not contain exactly nine values or any value is non-finite.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if the copied tensor cannot be transferred to device storage.

◆ setReferenceTemperature()

void CudaLangevinPistonIntegrator::setReferenceTemperature ( const double  referenceTemperature)

Sets the reference temperature.

Parameters
[in]referenceTemperatureFinite non-negative temperature in kelvin.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if referenceTemperature is non-finite or negative.
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if a selected crystal has inconsistent piston state while friction factors are recomputed.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if updated stochastic factors cannot be transferred.
Postcondition
When a crystal has been selected, piston-friction factors are recomputed using the new temperature.

◆ setRngSequencePos()

void CudaLangevinPistonIntegrator::setRngSequencePos ( const unsigned long long int  rngSequencePos)

Sets the piston RNG sequence position.

Parameters
[in]rngSequencePosDimensionless Philox sequence position.
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if a selected crystal requires RNG allocation or initialization and CUDA work fails.

◆ setRngStateData()

void CudaLangevinPistonIntegrator::setRngStateData ( const unsigned long long int  position,
const std::vector< curandStatePhilox4_32_10_t > &  states 
)
protected

Copies decoded piston RNG state to device storage.

Parameters
[in]positionDimensionless sequence position.
[in]statesBorrowed states copied during the call.

◆ setRngStates()

void CudaLangevinPistonIntegrator::setRngStates ( const std::string &  rngStateString)

Restores serialized piston RNG states.

Parameters
[in]rngStateStringBorrowed opaque string produced by getRngStates().
Exceptions
ApoCharmmErrorWith code ApoCharmmErrorCode::NotInitialized if no crystal type has been selected.
ApoCharmmErrorWith code ApoCharmmErrorCode::InvalidArgument if the decoded state count does not equal the active piston degree-of-freedom count.
ApoCharmmErrorWith code ApoCharmmErrorCode::Runtime if the string cannot be decoded.
ApoCharmmErrorWith code ApoCharmmErrorCode::Cuda if device allocation or transfer fails.

◆ useNoseHooverThermostat()

void CudaLangevinPistonIntegrator::useNoseHooverThermostat ( const bool  usingNoseHooverThermostat)

Enables or disables Nose-Hoover temperature coupling.

Parameters
[in]usingNoseHooverThermostattrue includes the Nose-Hoover extended variable in predictor-corrector updates; false omits it.

◆ useOldTemperature()

void CudaLangevinPistonIntegrator::useOldTemperature ( const bool  usingOldTemperature)

Selects the on-step temperature estimator.

Parameters
[in]usingOldTemperaturetrue selects kinetic-energy element 1 for native feedback and instantaneous temperature; false selects element 0.

◆ usingOldTemperature()

bool CudaLangevinPistonIntegrator::usingOldTemperature ( void  ) const

Returns the native temperature-estimator selector.

Returns
true for element 1 and false for element 0.

Member Data Documentation

◆ m_LangevinPistonHalfStepVelocity

CudaContainer<double> CudaLangevinPistonIntegrator::m_LangevinPistonHalfStepVelocity
protected

Stores allocated half-step piston velocity values.

Current propagation does not update this container after reset.

◆ m_PressureReductionPartialSums

CudaContainer<double> CudaLangevinPistonIntegrator::m_PressureReductionPartialSums
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.

◆ m_SurfaceTension

CudaContainer<double> CudaLangevinPistonIntegrator::m_SurfaceTension
protected

Stores the one-element target surface tension.

The current constructor allocates but does not initialize this value, and no public target setter exists.