pylammpsmpi.wrapper.ase module

class pylammpsmpi.wrapper.ase.LammpsASELibrary(working_directory=None, cores=1, comm=None, logger=None, log_file=None, library=None, diable_log_file=True)

Bases: object

close()
interactive_cells_getter()
interactive_cells_setter(cell)
interactive_energy_pot_getter()
interactive_energy_tot_getter()
interactive_forces_getter()
interactive_indices_getter()
interactive_indices_setter(indices, el_eam_lst)
interactive_lib_command(command)
interactive_positions_getter()
interactive_positions_setter(positions)
interactive_pressures_getter()
interactive_steps_getter()
interactive_stress_getter(enable_stress_computation=True)

This gives back an Nx3x3 array of stress/atom defined in http://lammps.sandia.gov/doc/compute_stress_atom.html Keep in mind that it is stress*volume in eV. Further discussion can be found on the website above.

Returns:

Nx3x3 np array of stress/atom

Return type:

numpy.array

interactive_structure_setter(structure, units, dimension, boundary, atom_style, el_eam_lst, calc_md=True)
interactive_temperatures_getter()
interactive_velocities_getter()
interactive_volume_getter()
set_fix_external_callback(fix_id, callback, caller=None)
class pylammpsmpi.wrapper.ase.UnfoldingPrism(cell, pbc=(True, True, True), digits=10)

Bases: Prism

Create a lammps-style triclinic prism object from a cell

The main purpose of the prism-object is to create suitable string representations of prism limits and atom positions within the prism. When creating the object, the digits parameter (default set to 10) specify the precision to use. lammps is picky about stuff being within semi-open intervals, e.g. for atom positions (when using create_atom in the in-file), x must be within [xlo, xhi).

Parameters:
  • cell

  • pbc

  • digits

f2qdec(f)
f2s(f)
get_lammps_prism_str()

Return a tuple of strings

pos_to_lammps(position)

Rotate an ase-cell position to the lammps cell orientation

Parameters:

position

Returns:

tuple of float.

unfold_cell(cell)

Unfold LAMMPS cell to original

Let C be the pyiron_atomistics cell and A be the Lammps cell, then define (in init) the rotation matrix between them as

R := C^inv.A

And recall that rotation matrices have the property

R^T == R^inv

Then left multiply the definition of R by C, and right multiply by R.T to get

C.R.R^T = C.C^inv.A.R^T

Then

C = A.R^T

After that, account for the folding process.

Parameters:

cell – LAMMPS cell,

Returns:

unfolded cell

pylammpsmpi.wrapper.ase.cell_is_skewed(cell, tolerance=1e-08)

Check whether the simulation box is skewed/sheared. The algorithm compares the box volume and the product of the box length in each direction. If these numbers do not match, the box is considered to be skewed and the function returns True

Parameters:

tolerance (float) – Relative tolerance above which the structure is considered as skewed

Returns:

Whether the box is skewed or not.

Return type:

(bool)

pylammpsmpi.wrapper.ase.get_fixed_atom_boolean_vector(structure)
pylammpsmpi.wrapper.ase.get_lammps_indicies_from_ase_indices(indices, structure, el_eam_lst)
pylammpsmpi.wrapper.ase.get_lammps_indicies_from_ase_structure(structure, el_eam_lst)
pylammpsmpi.wrapper.ase.get_species_indices_dict(structure)
pylammpsmpi.wrapper.ase.get_species_symbols(structure)
pylammpsmpi.wrapper.ase.get_structure_indices(structure)
pylammpsmpi.wrapper.ase.set_selective_dynamics(structure, calc_md)