gnrs.parallel¶
This module provides parallel processing utilities for Genarris.
This source code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree.
- gnrs.parallel.init_parallel(comm_in, seed=42)[source]¶
Initialize parallel environment with MPI communicator.
- Parameters:
comm_in (mpi4py.MPI.Comm) – MPI communicator object
seed (int) – Random seed
- Return type:
None
gnrs.parallel.structs¶
This module contains the DistributedStructs class, which is used to handle distributed structure dictionaries.
This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.
- class gnrs.parallel.structs.DistributedStructs[source]¶
Bases:
objectContains functions for handling distributed structure dictionaries.
Initialize with a dictionary of structures.
- Parameters:
structs – Dictionary mapping structure names to ASE Atoms objects
- Raises:
ValueError – If structs is not a dictionary
- __init__(structs)[source]¶
Initialize with a dictionary of structures.
- Parameters:
structs (dict) – Dictionary mapping structure names to ASE Atoms objects
- Raises:
ValueError – If structs is not a dictionary
- get_num_structs()[source]¶
Get the total number of structures in a distributed structures dictionary.
- Returns:
Total number of structures across all ranks
- Return type:
- find_matches(target, settings=None)[source]¶
Runs pymatgen duplicate checks on a distributed struct dictionary.
- Parameters:
target (ase.atoms.Atoms) – Target structure to be matched
settings (dict | None) – Settings for pymatgen StructureMatcher
- Returns:
List of matching structure IDs
- Return type:
- collect_property(prpty, ptype='info')[source]¶
Collects the property of all the structures into a list.
- find_spg(tol=0.001)[source]¶
Finds the space group of all structures. Space group number is stored in info[“spg”]
- Parameters:
tol (float) – Tolerance for symmetry finding
- Return type:
None
- checkpoint_save(path)[source]¶
Checkpoints partially done calculation for restart. This routine doesn’t communicate to others so that ranks can execute independently.
- Parameters:
path (str) – Directory path to save checkpoint
- Return type:
None
gnrs.parallel.io¶
This module provides functionality for reading and writing parallel data.
This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.
- gnrs.parallel.io.read_geometry_out(file_path)[source]¶
Master process reads geometry file and scatters data to other processes.
- gnrs.parallel.io.str2atoms(geometry_str)[source]¶
Constructs Atoms object from aims geometry format.