aiida_vasp.common.transform#

Collection of process functions for AiiDA, used for structure transformation

Module Contents#

Functions#

magnetic_structure_decorate

Create Quantum Espresso style decorated structure with given magnetic moments.

magnetic_structure_dedecorate

Remove decorations of a structure with multiple names for the same specie given that the decoration was previously created to give different species name for different initialisation of magnetic moments.

rattle

Rattle the structure by a certain amplitude

random_rattle

Rattle the structure by a certain amplitude

get_primitive

Create primitive structure use pymatgen interface

get_standard_primitive

Create the standard primitive structure via seekpath

spglib_refine_cell

Create the standard primitive structure via seekpath

get_standard_conventional

Create the standard primitive structure via seekpath

get_refined_structure

Create refined structure use pymatgen’s interface

get_conventional_standard_structure

Create conventional standard structure use pymatgen’s interface

make_supercell

Make supercell structure, keep the tags in order

niggli_reduce

Peroform niggli reduction using ase as the backend - this will rotate the structure into the standard setting

niggli_reduce_spglib

Peroform niggli reduction using spglib as backend - this does not rotate the structure

neb_interpolate

Interpolate NEB frames using the starting and the final structures

fix_atom_order

Fix atom order by finding NN distances bet ween two frames. This resolves the issue where two closely matching structures having diffferent atomic orders. Note that the two frames must be close enough for this to work

match_atomic_order_

Reorder the atoms to that of the reference.

create_additional_species

Create additional species depending on magnetic moments. For example, create Fe1 and Fe2 if there are Fe with different magnetisations.

convert_to_plain_list

Covert from a decorated species list to a plain list of symbols and magnetic moments.

API#

aiida_vasp.common.transform.magnetic_structure_decorate(structure: aiida.orm.StructureData, magmom: aiida.orm.List) dict[str, Any][source]#

Create Quantum Espresso style decorated structure with given magnetic moments.

aiida_vasp.common.transform.magnetic_structure_dedecorate(structure: aiida.orm.StructureData, mapping: aiida.orm.Dict) dict[str, Any][source]#

Remove decorations of a structure with multiple names for the same specie given that the decoration was previously created to give different species name for different initialisation of magnetic moments.

aiida_vasp.common.transform.rattle(structure: aiida.orm.StructureData, amp: aiida.orm.Float) aiida.orm.StructureData[source]#

Rattle the structure by a certain amplitude

aiida_vasp.common.transform.random_rattle(structure: aiida.orm.StructureData, amp: aiida.orm.Float) aiida.orm.StructureData[source]#

Rattle the structure by a certain amplitude

This function is similar to rattle, but it uses a random seed so it generates different structures when called with the same structure.

aiida_vasp.common.transform.get_primitive(structure: aiida.orm.StructureData) aiida.orm.StructureData[source]#

Create primitive structure use pymatgen interface

aiida_vasp.common.transform.get_standard_primitive(structure: aiida.orm.StructureData, **kwargs: Any) aiida.orm.StructureData[source]#

Create the standard primitive structure via seekpath

aiida_vasp.common.transform.spglib_refine_cell(structure: aiida.orm.StructureData, symprec: Any) aiida.orm.StructureData[source]#

Create the standard primitive structure via seekpath

aiida_vasp.common.transform.get_standard_conventional(structure: aiida.orm.StructureData) aiida.orm.StructureData[source]#

Create the standard primitive structure via seekpath

aiida_vasp.common.transform.get_refined_structure(structure: aiida.orm.StructureData, symprec: aiida.orm.Float, angle_tolerance: Any) aiida.orm.StructureData[source]#

Create refined structure use pymatgen’s interface

aiida_vasp.common.transform.get_conventional_standard_structure(structure: aiida.orm.StructureData, symprec: aiida.orm.Float, angle_tolerance: Any) Any[source]#

Create conventional standard structure use pymatgen’s interface

aiida_vasp.common.transform.make_supercell(structure: Any, supercell: Any, **kwargs: Any) dict[str, Any][source]#

Make supercell structure, keep the tags in order

aiida_vasp.common.transform.niggli_reduce(structure: aiida.orm.StructureData) aiida.orm.StructureData[source]#

Peroform niggli reduction using ase as the backend - this will rotate the structure into the standard setting

aiida_vasp.common.transform.niggli_reduce_spglib(structure: aiida.orm.StructureData) aiida.orm.StructureData[source]#

Peroform niggli reduction using spglib as backend - this does not rotate the structure

aiida_vasp.common.transform.neb_interpolate(init_structure: aiida.orm.StructureData, final_strucrture: aiida.orm.StructureData, nimages: aiida.orm.Int) dict[str, aiida.orm.StructureData][source]#

Interpolate NEB frames using the starting and the final structures

Get around the PBC wrapping problem by calculating the MIC displacements from the initial to the final structure

The initial structure is not changed, while the final structure is modified to be consistent with the initial structure in terms of absolute displacements, i.e. the final structure is unwrapped.

aiida_vasp.common.transform.fix_atom_order(reference: aiida.orm.StructureData, to_fix: aiida.orm.StructureData) aiida.orm.StructureData[source]#

Fix atom order by finding NN distances bet ween two frames. This resolves the issue where two closely matching structures having diffferent atomic orders. Note that the two frames must be close enough for this to work

aiida_vasp.common.transform.match_atomic_order_(atoms: ase.Atoms, atoms_ref: ase.Atoms) Tuple[ase.Atoms, List[int]][source]#

Reorder the atoms to that of the reference.

Only works for identical or nearly identical structures that are ordered differently. Returns a new Atoms object with order similar to that of atoms_ref as well as the sorting indices.

aiida_vasp.common.transform.create_additional_species(species: list[str], magmoms: list[float]) tuple[list[str], dict[str, float]][source]#

Create additional species depending on magnetic moments. For example, create Fe1 and Fe2 if there are Fe with different magnetisations.

Returns:

a tuples of (newspecies, magmom_mapping)

aiida_vasp.common.transform.convert_to_plain_list(species: list[str], magmom_mapping: dict[str, float]) tuple[list[str], list[float]][source]#

Covert from a decorated species list to a plain list of symbols and magnetic moments.

Returns:

A tuple of (symbols, magmoms)