pwtools.random.RandomStructure.get_random_struct¶
- RandomStructure.get_random_struct(fail=True)[source]¶
Generate random cryst_const and atom coords.
If fail=True, then RandomStructureFail may be raised if structure generation fails (cell_maxtry or atom_maxtry exceeded).
If fail=False, then the process is repeated over and over (may run forever). Use this if you know that your settings (all *_scale inputs) are sensible + struct generation fails “sometimes” and you absolutely want to create a struct.
- Parameters:
fail (bool, optional)
- Return type:
- Raises:
RandomStructureFail (if fail=True). –