narupa.imd.particle_interaction module¶
Module providing a wrapper class around the protobuf interaction message.
-
class
narupa.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 protobuf representation of an interaction. Provides easy to use getters and setters.
For convenience, the getters all copy the underlying data into numpy arrays, rather than the low level containers used by protobuf.
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'¶
-
interaction_type
¶ The type of interaction being applied, default ‘gaussian’.
-
mass_weighted
¶ Indicates whether this interaction should be mass weighted, default True.
-
max_force
¶ The maximum force, in kJ/(mol*nm), this interaction will be allowed to apply to the system.
-
particles
¶ The list of particles this interaction applies to.
-
position
¶ The position of the interaction in nanometers, which defaults to
[0 0 0]
-
properties
¶ Gets the other properties for this interaction
-
reset_velocities
¶ Indicates whether this interaction should be reset the velocities of the atoms it interacts with after interaction, defaulting to False.
-
scale
¶ The scale factor of the interaction, which defaults to 1.
Adjusting this changes the strength of the interactive force applied.