scine_puffin.utilities.surface_helper¶
Functions
|
Generate the dictionary defining a pymatgen Slab object from a database Structure, which must hold the required information as a property. |
|
Update the slab dict property of the given structure with its current positions and periodic boundary conditions |
- scine_puffin.utilities.surface_helper.get_slab_dict(structure: db.Structure, properties: db.Collection) dict [source]¶
Generate the dictionary defining a pymatgen Slab object from a database Structure, which must hold the required information as a property.
- Parameters:
- structuredb.Structure
The periodic Structure
- propertiesdb.Collection
The properties collection to link the structure’s properties
- Returns:
- dict
A dictionary that can be used as a constructor for the pymatgen.core.surface.Slab
- Raises:
- RuntimeError
The property ‘slab_dict’ not present
Notes
This code is taken from scine.chemoton.utilities.surfaces.pymatgen_interface
- scine_puffin.utilities.surface_helper.update_slab_dict(structure: db.Structure, properties: db.Collection, replace_property: bool = False) None [source]¶
Update the slab dict property of the given structure with its current positions and periodic boundary conditions
- Parameters:
- structuredb.Structure
The structure holding the property
- propertiesdb.Collection
The properties collection to link the structure’s properties
- replace_propertybool, optional
If the old property should be replaced with the new one
- Raises:
- RuntimeError
The structure is not periodic
Notes
This code is taken from scine.chemoton.utilities.surfaces.pymatgen_interface