elastic_constants_static.py

Calculation functions

elastic_constants_static(lammps_command: str, system: System, potential: Potential, mpi_command: str | None = None, strainrange: float = 1e-06, etol: float = 0.0, ftol: float = 0.0, maxiter: int = 10000, maxeval: int = 100000, dmax: float = 0.01) dict

Repeatedly runs the ELASTIC example distributed with LAMMPS until box dimensions converge within a tolerance.

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.

  • mpi_command (str, optional) – The MPI command for running LAMMPS in parallel. If not given, LAMMPS will run serially.

  • strainrange (float, optional) – The small strain value to apply when calculating the elastic constants (default is 1e-6).

  • etol (float, optional) – The energy tolerance for the structure minimization. This value is unitless. (Default is 0.0).

  • ftol (float, optional) – The force tolerance for the structure minimization. This value is in units of force. (Default is 0.0).

  • maxiter (int, optional) – The maximum number of minimization iterations to use (default is 10000).

  • maxeval (int, optional) – The maximum number of minimization evaluations to use (default is 100000).

  • dmax (float, optional) – The maximum distance in length units that any atom is allowed to relax in any direction during a single minimization iteration (default is 0.01 Angstroms).

Returns:

Dictionary of results consisting of keys:

  • ’raw_Cij_negative’ (numpy.ndarray) - The values of Cij obtained from only the negative strains.

  • ’raw_Cij_positive’ (numpy.ndarray) - The values of Cij obtained from only the positive strains.

  • ’C’ (atomman.ElasticConstants) - The computed elastic constants obtained from averaging the negative and positive strain values.

Return type:

dict

restart_commands(potential: Potential, symbols: list) str

Command lines to restart calculation from the initial relaxation

Parameters:
  • potential (lmp.Potential) – The interatomic potential.

  • symbols (list) – The list of symbol models associated with the interatomic potential.