nanover.imd.particle_interaction module

Module providing a wrapper class around interaction data.

class nanover.imd.particle_interaction.ParticleInteraction(position=(0.0, 0.0, 0.0), particles=(), interaction_type='gaussian', scale=1.0, mass_weighted=True, reset_velocities=False, max_force=20000.0, **kwargs)

Bases: object

A wrapper around the plain data representation of an interaction. Provides easy to use getters and setters.

Parameters:
  • interaction_type – The type of interaction being used, default is ‘gaussian’ for a Gaussian force.

  • scale – The scale factor applied to the interaction, default is 1.

  • mass_weighted – Whether the interaction will be mass weighted or not.

  • reset_velocities – Whether to reset velocities after interacting.

  • max_force – The maximum force that will be allowed to be applied to a given atom in a given cartesian direction. Helps maintain stability for unbounded potentials.

MASS_WEIGHTED_KEY = 'mass_weighted'
MAX_FORCE_KEY = 'max_force'
RESET_VELOCITIES_KEY = 'reset_velocities'
SCALE_KEY = 'scale'
TYPE_KEY = 'type'
property interaction_type: str

The type of interaction being applied, default ‘gaussian’.

property mass_weighted: bool

Indicates whether this interaction should be mass weighted, default True.

property max_force: float

The maximum force, in kJ/(mol*nm), this interaction will be allowed to apply to the system.

property particles: ndarray

The list of particles this interaction applies to.

property position: ndarray[tuple[int, ...], dtype[float64]]

The position of the interaction in nanometers, which defaults to [0 0 0]

property properties: dict[str, Any]

Gets the other properties for this interaction

property reset_velocities: bool

Indicates whether this interaction should be reset the velocities of the atoms it interacts with after interaction, defaulting to False.

property scale: float

The scale factor of the interaction, which defaults to 1.

Adjusting this changes the strength of the interactive force applied.