change_elements#

poscar_modify.change_elements(indexes: np.ndarray | List[int] | int, newElements: np.ndarray | List[str] | str, human: bool = False)[source]#

It changes the Element of one or more atoms in this poscar object.

Parameters:
  • indexes (np.ndarray | List[int] | int) – the 0-based index(es) of the atom to be replaced.

  • newElements (np.ndarray | List[str] | str) – the element(s) to replace. Same size of indexes

  • human (bool) – if True, the index(es) will be one-based, as humans like to count. Default is False