chemcoord.xyz_functions.to_molden

chemcoord.xyz_functions.to_molden(cartesians: ~collections.abc.Iterable[~chemcoord._cartesian_coordinates.cartesian_class_main.Cartesian], buf: None = None, sort_index: bool = True, overwrite: bool = True, float_format: ~collections.abc.Callable[[float], str] = <built-in method format of str object>) str[source]
chemcoord.xyz_functions.to_molden(cartesians: ~collections.abc.Iterable[~chemcoord._cartesian_coordinates.cartesian_class_main.Cartesian], buf: str | ~os.PathLike[str], sort_index: bool = True, overwrite: bool = True, float_format: ~collections.abc.Callable[[float], str] = <built-in method format of str object>) None

Write a list of Cartesians into a molden file.

Note

Since it permamently writes a file, this function is strictly speaking not sideeffect free. The list to be written is of course not changed.

Parameters:
  • cartesians – List of Cartesian objects.

  • buf – Optional buffer or file path to write to.

  • sort_index – If True, the Cartesian is sorted by the index before writing.

  • overwrite – May overwrite existing files.

  • float_format – Formatter function to apply to columns if they are floats.