Distance¶
- class hoomd.md.constrain.Distance(tolerance=0.001)¶
Bases:
ConstraintConstrain pairwise particle distances.
- Parameters:
tolerance (float) – Relative tolerance for constraint violation warnings.
Distanceapplies forces between particles that constrain the distances between particles to specific values. The algorithm implemented is described in:M. Yoneya, H. J. C. Berendsen, and K. Hirasawa, “A Non-Iterative Matrix Method for Constraint Molecular Dynamics Simulations,” Molecular Simulation, vol. 13, no. 6, pp. 395–405, 1994.
M. Yoneya, “A Generalized Non-iterative Matrix Method for Constraint Molecular Dynamics Simulations,” Journal of Computational Physics, vol. 172, no. 1, pp. 188–197, Sep. 2001.
Each distance constraint takes the form:
Where and are the the particle tags in the
constraint_groupand is the constraint distance as given by the system state.The method sets the second derivative of the Lagrange multipliers with respect to time to zero, such that both the distance constraints and their time derivatives are conserved within the accuracy of the Velocity Verlet scheme (. It solves the corresponding linear system of equations to determine the force. The constraints are satisfied at , so the scheme is self-correcting and avoids drifts.
Add an instance of
Distanceto the integrator constraints listhoomd.md.Integrator.constraintsto apply the force during the simulation.Warning
In MPI simulations, it is an error when molecules defined by constraints extend over more than half the local domain size because all particles connected through constraints will be communicated between ranks as ghost particles.
Note
tolerancesets the tolerance to detect constraint violations and issue a warning message. It does not influence the computation of the constraint force.Members inherited from
AutotunedObject:- property kernel_parameters¶
Kernel parameters.
Read more...
- property is_tuning_complete¶
Check if kernel parameter tuning is complete.
Read more...
- tune_kernel_parameters()¶
Start tuning kernel parameters.
Read more...
Members inherited from
Force:- additional_energy¶
Additional energy term.
Read more...
- additional_virial¶
Additional virial tensor term .
Read more...
- cpu_local_force_arrays¶
Local force arrays on the CPU.
Read more...
- energies¶
Energy contribution from each particle.
Read more...
- energy¶
The potential energy of the system from this force.
Read more...
- forces¶
The force applied to each particle.
Read more...
- gpu_local_force_arrays¶
Local force arrays on the GPU.
Read more...
- torques¶
The torque applied to each particle.
Read more...
- virials¶
Virial tensor contribution from each particle.
Read more...
Members defined in
Distance: