Pair¶
- class hoomd.md.pair.Pair(nlist, default_r_cut=None, default_r_on=0.0, mode='none')¶
Bases:
ForceBase class pair force.
Pairis the base class for all pair forces.Warning
This class should not be instantiated by users. The class can be used for
isinstanceorissubclasschecks.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
Pair:- nlist¶
Neighbor list used to compute the pair force.
- r_cut¶
Cuttoff radius beyond which the energy and force are 0 . Optional: defaults to the value
default_r_cutspecified on construction.Type:
TypeParameter[tuple[particle_type,particle_type],float])
- r_on¶
Radius at which the smoothing modification to the potential starts . Optional: defaults to the value
default_r_onspecified on construction.Type:
TypeParameter[tuple[particle_type,particle_type],float])
- compute_energy(tags1, tags2)¶
Compute the energy between two sets of particles.
- Parameters:
tags1 (
ndarray<int32>) – a numpy array of particle tags in the first group.tags2 (
ndarray<int32>) – a numpy array of particle tags in the second group.
where is the pairwise energy between two particles and .
Assumed properties of the sets tags1 and tags2 are:
tags1 and tags2 are disjoint
all elements in tags1 and tags2 are unique
tags1 and tags2 are contiguous numpy arrays of dtype int32
None of these properties are validated.
Examples:
tags = numpy.linspace(0, N - 1, 1, dtype=numpy.int32) # computes the energy between even and odd particles U = mypair.compute_energy( tags1=numpy.array(tags[0:N:2]), tags2=numpy.array(tags[1:N:2]), )