point_defect_static.py

Calculation functions

calc(lammps_command: str, system: System, potential: Potential, point_kwargs: list | dict, cutoff: float, mpi_command: str | None = None, etol: float = 0.0, ftol: float = 0.0, maxiter: int = 10000, maxeval: int = 100000, dmax: float = 0.01, tol: float = 1e-05) dict

Adds one or more point defects to a system and evaluates the defect formation energy. Evaluates a relaxed system containing a point defect to determine if the defect structure has transformed to a different configuration.

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.

  • point_kwargs (dict or list of dict) – One or more dictionaries containing the keyword arguments for the atomman.defect.point() function to generate specific point defect configuration(s).

  • cutoff (float) – Cutoff distance to use in identifying neighbor atoms.

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

  • sim_directory (str, optional) – The path to the directory to perform the simulation in. If not given, will use the current working directory.

  • 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).

  • tol (float, optional) – Absolute tolerance to use for identifying if a defect has reconfigured (default is 1e-5 Angstoms).

Returns:

Dictionary of results consisting of keys:

  • ’E_pot’ (float) - The per-atom potential energy of the bulk system.

  • ’E_ptd_f’ (float) - The point defect formation energy.

  • ’E_total_base’ (float) - The total potential energy of the relaxed bulk system.

  • ’E_total_ptd’ (float) - The total potential energy of the relaxed defect system.

  • ’pij_tensor’ (numpy.ndarray of float) - The elastic dipole tensor associated with the defect.

  • ’system_base’ (atomman.System) - The relaxed bulk system.

  • ’system_ptd’ (atomman.System) - The relaxed defect system.

  • ’dumpfile_base’ (str) - The filename of the LAMMPS dump file for the relaxed bulk system.

  • ’dumpfile_ptd’ (str) - The filename of the LAMMPS dump file for the relaxed defect system.

  • ’has_reconfigured’ (bool) - Flag indicating if the structure has been identified as relaxing to a different defect configuration.

  • ’centrosummation’ (numpy.ndarray of float) - The centrosummation parameter used for evaluating if the configuration has relaxed.

  • ’position_shift’ (numpy.ndarray of float) - The position_shift parameter used for evaluating if the configuration has relaxed. Only given for interstitial and substitutional-style defects.

  • ’db_vect_shift’ (numpy.ndarray of float) - The db_vect_shift parameter used for evaluating if the configuration has relaxed. Only given for dumbbell-style defects.

Return type:

dict

check_ptd_config(system: System, point_kwargs: list | dict, cutoff: float, tol: float = 1e-05) dict

Evaluates a relaxed system containing a point defect to determine if the defect structure has transformed to a different configuration.

Parameters:
  • system (atomman.System) – The relaxed defect system.

  • point_kwargs (dict or list of dict) – One or more dictionaries containing the keyword arguments for the atomman.defect.point() function to generate specific point defect configuration(s).

  • cutoff (float) – Cutoff distance to use in identifying neighbor atoms.

  • tol (float, optional) – Absolute tolerance to use for identifying if a defect has reconfigured (default is 1e-5 Angstoms).

Returns:

Dictionary of results consisting of keys:

  • ’has_reconfigured’ (bool) - Flag indicating if the structure has been identified as relaxing to a different defect configuration.

  • ’centrosummation’ (numpy.ndarray of float) - The centrosummation parameter used for evaluating if the configuration has relaxed.

  • ’position_shift’ (numpy.ndarray of float) - The position_shift parameter used for evaluating if the configuration has relaxed. Only given for interstitial and substitutional-style defects.

  • ’db_vect_shift’ (numpy.ndarray of float) - The db_vect_shift parameter used for evaluating if the configuration has relaxed. Only given for dumbbell-style defects.

Return type:

dict

pointdefect(lammps_command: str, system: System, potential: Potential, point_kwargs: list | dict, mpi_command: str | None = None, etol: float = 0.0, ftol: float = 0.0, maxiter: int = 10000, maxeval: int = 100000, dmax: float = 0.01) dict

Adds one or more point defects to a system and evaluates the defect formation energy.

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.

  • point_kwargs (dict or list of dict) – One or more dictionaries containing the keyword arguments for the atomman.defect.point() function to generate specific point defect configuration(s).

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

  • sim_directory (str, optional) – The path to the directory to perform the simulation in. If not given, will use the current working directory.

  • 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:

  • ’E_pot’ (float) - The per-atom potential energy of the bulk system.

  • ’E_ptd_f’ (float) - The point defect formation energy.

  • ’E_total_base’ (float) - The total potential energy of the relaxed bulk system.

  • ’E_total_ptd’ (float) - The total potential energy of the relaxed defect system.

  • ’pij_tensor’ (numpy.ndarray of float) - The elastic dipole tensor associated with the defect.

  • ’system_base’ (atomman.System) - The relaxed bulk system.

  • ’system_ptd’ (atomman.System) - The relaxed defect system.

  • ’dumpfile_base’ (str) - The filename of the LAMMPS dump file for the relaxed bulk system.

  • ’dumpfile_ptd’ (str) - The filename of the LAMMPS dump file for the relaxed defect system.

Return type:

dict