pylj.util¶
-
class
pylj.util.
System
(number_of_particles, temperature, box_length, constants, forcefield, mass, init_conf='square', timestep_length=1e-14, cut_off=15)[source]¶ Bases:
object
Simulation system. This class is designed to store all of the information about the job that is being run. This includes the particles object, as will as sampling objects such as the temperature, pressure, etc. arrays. :param number_of_particles: Number of particles to simulate. :type number_of_particles: int :param temperature: Initial temperature of the particles, in Kelvin. :type temperature: float :param box_length: Length of a single dimension of the simulation square, in Angstrom. :type box_length: float :param init_conf: The way that the particles are initially positioned. Should be one of:
- ‘square’
- ‘random’
Parameters: - timestep_length (float (optional)) – Length for each Velocity-Verlet integration step, in seconds.
- cut_off (float (optional)) – The distance apart that the particles must be to consider there interaction to be negliable.
- constants (float, array_like (optional)) – The values of the constants for the forcefield used.
- mass (float (optional)) – The mass of the particles being simulated.
- forcefield (function (optional)) – The particular forcefield to be used to find the energy and forces.
-
compute_energy
()[source]¶ Maps to the compute_energy function in either the comp (if Cython is installed) or the pairwise module and allows for a cleaner interface.
-
compute_force
()[source]¶ Maps to the compute_force function in either the comp (if Cython is installed) or the pairwise module and allows for a cleaner interface.
-
heat_bath
(bath_temperature)[source]¶ Maps to the heat_bath function in either the comp (if Cython is installed) or the pairwise modules. :param target_temperature: The target temperature for the simulation. :type target_temperature: float
-
integrate
[source]¶ Maps the chosen integration method. :param method: The integration method to be used, e.g. md.velocity_verlet. :type method: method
-
mc_sample
()[source]¶ Maps to the mc.sample function. :param energy: Energy to add to the sample :type energy: float