doped

Module contents

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 multiprocessing Pool, to throw a clearer error message when RuntimeErrors are raised multiprocessing within doped is 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. If None, will use mp.cpu_count() - 1 (i.e. one less than the number of available CPUs).

Yields:

Pool – A Pool object with the specified number of processes.

Submodules