doped module (__init__.py)
doped is a python package for managing solid-state defect calculations,
with functionality to generate defect structures and relevant competing phases
(for chemical potentials), interface with ShakeNBreak
(https://shakenbreak.readthedocs.io) for defect structure-searching (see
https://www.nature.com/articles/s41524-023-00973-1), write VASP input files for
defect supercell calculations, and automatically parse and analyse the results.
- doped.get_mp_context()[source]
Get a multiprocessing context that is compatible with the current OS.
- doped.pool_manager(processes: int | None = None)[source]
Context manager for
multiprocessingPool, to throw a clearer error message whenRuntimeErrors are raisedmultiprocessingwithindopedis used in a python script.See https://doped.readthedocs.io/en/latest/Troubleshooting.html#errors-with-python-scripts
- Parameters:
processes (int | None) – Number of processes to use with
Pool. IfNone, will usemp.cpu_count() - 1(i.e. one less than the number of available CPUs).- Yields:
Pool – A
Poolobject with the specified number of processes.