Binding
- class mechanica.MxBind
- static particles(p: MxPotential, a: MxParticle, b: MxParticle) HRESULT
Bind a potential to a pair of particles
- Parameters
p (
MxPotential) – The potentiala (
MxParticle) – The first particleb (
MxParticle) – The second particle
- Return type
int
- Returns
HRESULT
- static types(p: MxPotential, a: MxParticleType, b: MxParticleType, bound: bool = False) HRESULT
Bind a potential to a pair of particle types.
Automatically updates when running on a CUDA device.
- Parameters
p (
MxPotential) – The potentiala (
MxParticleType) – The first typeb (
MxParticleType) – The second typebound (boolean) – Flag signifying whether this potential exclusively operates on particles of different clusters, optional
- Return type
int
- Returns
HRESULT
- static boundaryConditions(p: MxPotential, t: MxParticleType) HRESULT
Bind a potential to a pair of particle type and all boundary conditions.
Automatically updates when running on a CUDA device.
- Parameters
p (
MxPotential) – The potentialt (
MxParticleType) – The particle type
- Return type
int
- Returns
HRESULT
- static boundaryCondition(p: MxPotential, bc: MxBoundaryCondition, t: MxParticleType) HRESULT
Bind a potential to a pair of particle type and a boundary conditions.
Automatically updates when running on a CUDA device.
- Parameters
p (
MxPotential) – The potentialbcs – The boundary condition
t (
MxParticleType) – The particle type
- Return type
int
- Returns
HRESULT
- static force(*args) HRESULT
Overload 1:
Bind a force to a particle type
- Parameters
force (
MxForce) – The forcea_type (
MxParticleType) – The particle type
- Return type
int
- Returns
HRESULT
Overload 2:
Bind a force to a particle type with magnitude proportional to a species amount
- Parameters
force (
MxForce) – The forcea_type (
MxParticleType) – The particle typecoupling_symbol (string) – The symbol of the species
- Return type
int
- Returns
HRESULT
- static bonds(potential, particles, cutoff, pairs=None, half_life=None, bond_energy=None, flags=0)