pyiron.lammps.control module

class pyiron.lammps.control.LammpsControl(input_file_name=None, **qwargs)[source]

Bases: pyiron.base.generic.parameters.GenericParameters

calc_md(temperature=None, pressure=None, n_ionic_steps=1000, time_step=1.0, n_print=100, temperature_damping_timescale=100.0, pressure_damping_timescale=1000.0, seed=None, tloop=None, initial_temperature=None, langevin=False, delta_temp=None, delta_press=None, job_name='')[source]

Set an MD calculation within LAMMPS. Nosé Hoover is used by default.

Parameters
  • temperature (None/float) – Target temperature. If set to None, an NVE calculation is performed. It is required when the pressure is set or langevin is set

  • pressure (None/float/numpy.ndarray/list) – Target pressure. If set to None, an NVE or an NVT calculation is performed. A length-3 list or array may be given to specify x-, y- and z-components individually. In this case, floats and None may be mixed to allow relaxation only in particular directions.

  • n_ionic_steps (int) – Number of ionic steps

  • time_step (float) – Step size between two steps. In fs if units==metal

  • n_print (int) – Print frequency

  • temperature_damping_timescale (float) – The time associated with the thermostat adjusting the temperature. (In fs. After rescaling to appropriate time units, is equivalent to Lammps’ Tdamp.)

  • pressure_damping_timescale (float) – The time associated with the barostat adjusting the temperature. (In fs. After rescaling to appropriate time units, is equivalent to Lammps’ Pdamp.)

  • seed (int) – Seed for the random number generation (required for the velocity creation)

  • tloop

  • initial_temperature (None/float) – Initial temperature according to which the initial velocity field is created. If None, the initial temperature will be twice the target temperature (which would go immediately down to the target temperature as described in equipartition theorem). If 0, the velocity field is not initialized (in which case the initial velocity given in structure will be used). If any other number is given, this value is going to be used for the initial temperature.

  • langevin (bool) – (True or False) Activate Langevin dynamics

  • delta_temp (float) – Thermostat timescale, but in your Lammps time units, whatever those are. (DEPRECATED.)

  • delta_press (float) – Barostat timescale, but in your Lammps time units, whatever those are. (DEPRECATED.)

  • job_name (str) – Job name of the job to generate a unique random seed.

calc_minimize(e_tol=0.0, f_tol=1e-08, max_iter=100000, pressure=None, n_print=100)[source]
calc_static()[source]
property dataset
static generate_seed_from_job(job_name='', seed=0)[source]

Generate a unique seed from the job name.

Parameters
  • job_name (str) – job_name of the current job to generate the seed

  • seed (int) – integer to access part of the seed

Returns

random seed generated based on the hash

Return type

int

load_default(file_content=None)[source]

Load defaults resets the dataset in the background to be empty

set_initial_velocity(temperature, seed=None, gaussian=False, append_value=False, zero_lin_momentum=True, zero_rot_momentum=True, job_name='')[source]

Create initial velocities via velocity all create. More information can be found on LAMMPS website: https://lammps.sandia.gov/doc/velocity.html

Parameters
  • temperature – (int or float)

  • seed – (int) Seed for the initial random number generator

  • gaussian – (True/False) Create velocity according to the Gaussian distribution (otherwise uniform)

  • append_value – (True/False) Add the velocity values to the current velocities (probably not functional now)

  • zero_lin_momentum – (True/False) Cancel the total linear momentum

  • zero_rot_momentum – (True/False) Cancel the total angular momentum

  • job_name – (str) job name to generate seed