free_energy_liquid.py
Calculation functions
- free_energy_liquid(lammps_command: str, system: System, potential: Potential, temperature: float, mpi_command: str | None = None, p: int = 50, sigma: float = 1.5, equilsteps: int = 25000, switchsteps: int = 50000, pressure: float = 0.0, createvelocities: bool = True, randomseed: int | None = None) dict
Performs a full dynamic relax on a given system at the given temperature to the specified pressure state.
- Parameters:
lammps_command (str) – Command for running LAMMPS.
system (atomman.System) – The system to perform the calculation on.
potential (atomman.lammps.Potential) – The LAMMPS implemented potential to use.
temperature (float) – The temperature to run at.
mpi_command (str, optional) – The MPI command for running LAMMPS in parallel. If not given, LAMMPS will run serially.
p (int, optional) – The Uhlenbeck-Ford energy scale multiplier. Allowed values are 1, 25, 50, 75, and 100. Default value is 50.
sigma (float, optional) – The Uhlenbeck-Ford length scale parameter. Default value is 1.5.
equilsteps (int, optional) – The number of equilibration timesteps at the beginning of simulations to ignore before evaluations. This is used before each thermo switch run. Default value is 25000.
switchsteps (int, optional) – The number of integration steps to perform during each of the two switch runs. Default value is 50000.
pressure (float, optional) – A value of pressure to use for computing the Gibbs free energy from the Helmholtz free energy. NOTE: this is not used to equilibrate the system during this calculation! Default value is 0.0.
randomseed (int or None, optional) – Random number seed used by LAMMPS. Default is None which will select a random int between 1 and 900000000.
- Returns:
Dictionary of results consisting of keys:
’work_forward’ (float) - The work/atom during the forward switching step.
’work_reverse’ (float) - The work/atom during the reverse switching step.
’work’ (float) - The reversible work/atom.
’Helmholtz_reference’ (float) - The Helmholtz free energy/atom for the reference Einstein solid.
’Helmholtz’ (float) - The Helmholtz free energy/atom.
’Gibbs’ (float) - The Gibbs free energy/atom.
- Return type: