chemcoord.xyz_functions.allclose

chemcoord.xyz_functions.allclose(a, b, align=False, rtol=1e-05, atol=1e-08)[source]

Compare two molecules for numerical equality.

Parameters:
  • a (Cartesian) – First molecule.

  • b (Cartesian) – Second molecule.

  • align (bool) – If True, a and b are prealigned along their principal axes of inertia and moved to their barycenters before comparing.

  • rtol (float) – Relative tolerance for the numerical equality comparison (see numpy.allclose).

  • atol (float) – Absolute tolerance for the numerical equality comparison (see numpy.allclose).

Returns:

True if all coordinates are close, False otherwise.

Return type:

bool