add_atom

Contents

add_atom#

autoplex.misc.utils.mock_custom_builder.add_atom(structure, element, min_separation)[source]#

Find a suitable position for a new atom.

Picks a location within the simulation cell at random, ensures no other atoms are present within a fixed radius (min_separation), and adds an atom with symbol element to structure. If another atom is found within the close contact radius, the candidate atom is removed and the search process loops automatically.

Parameters:
  • structure (ase.Atoms) – The cell to place the new atom in

  • element (str) – The chemical symbol for the new atom to be added

  • min_separation (float) – The minimum separation to be kept between all atoms (in Ang)

Return type:

None