mc_rattle#
- autoplex.data.common.utils.mc_rattle(structure, n_structures=5, rattle_std=0.003, min_distance=1.5, rattle_seed=42, rattle_mc_n_iter=10)[source]#
Take in a pymatgen Structure object and generates rattled structures.
Randomly draws displacements with a MC trial step that penalises displacements leading to very small interatomic distances. Displacements generated will roughly be n_iter**0.5 * rattle_std for small values of n_iter. See https://hiphive.materialsmodeling.org/moduleref/structures.html?highlight=generate_mc_rattled_structures for more details.
- Parameters:
structure (Structure.) – Pymatgen structures object.
n_structures (int.) – Number of rattled structures to generate.
rattle_std (float.) – Rattle amplitude (standard deviation in normal distribution). N.B. this value is not connected to the final average displacement for the structures. Default= 0.003.
min_distance (float.) – Minimum separation of any two atoms in the rattled structures. Used for computing the probability for each rattle move. Default= 1.5A.
rattle_seed (int.) – Seed for setting up NumPy random state from which random numbers are generated. Default= 42.
rattle_mc_n_iter (int.) – Number of Monte Carlo iterations. Larger number of iterations will generate larger displacements. Default=10.
- Returns:
Monte-Carlo rattled structures.
- Return type:
Response.output.