pymatgen.analysis.chemenv.utils.math_utils module

This module contains some math utils that are used in the chemenv package.

cosinus_step(xx, edges=None, inverse=False)[source]
Parameters
  • xx

  • edges

  • inverse

Returns

divisors(n)[source]

From a given natural integer, returns the list of divisors in ascending order :param n: Natural integer :return: List of divisors of n in ascending order

get_center_of_arc(p1, p2, radius)[source]
Parameters
  • p1

  • p2

  • radius

Returns

get_linearly_independent_vectors(vectors_list)[source]
Parameters

vectors_list

Returns

normal_cdf_step(xx, mean, scale)[source]
Parameters
  • xx

  • mean

  • scale

Returns

power2_decreasing_exp(xx, edges=None, alpha=1.0)[source]
Parameters
  • xx

  • edges

  • alpha

Returns

power2_inverse_decreasing(xx, edges=None, prefactor=None)[source]
Parameters
  • xx

  • edges

  • prefactor

Returns

power2_inverse_power2_decreasing(xx, edges=None, prefactor=None)[source]
Parameters
  • xx

  • edges

  • prefactor

Returns

power2_inverse_powern_decreasing(xx, edges=None, prefactor=None, powern=2.0)[source]
Parameters
  • xx

  • edges

  • prefactor

  • powern

Returns

power2_tangent_decreasing(xx, edges=None, prefactor=None)[source]
Parameters
  • xx

  • edges

  • prefactor

Returns

power3_step(xx, edges=None, inverse=False)[source]
Parameters
  • xx

  • edges

  • inverse

Returns

powern_decreasing(xx, edges=None, nn=2)[source]
Parameters
  • xx

  • edges

  • nn

Returns

powern_parts_step(xx, edges=None, inverse=False, nn=2)[source]
Parameters
  • xx

  • edges

  • inverse

  • nn

Returns

prime_factors(n)[source]

Lists prime factors of a given natural integer, from greatest to smallest :param n: Natural integer :rtype : list of all prime factors of the given natural n

scale_and_clamp(xx, edge0, edge1, clamp0, clamp1)[source]
Parameters
  • xx

  • edge0

  • edge1

  • clamp0

  • clamp1

Returns

smootherstep(xx, edges=None, inverse=False)[source]
Parameters
  • xx

  • edges

  • inverse

Returns

smoothstep(xx, edges=None, inverse=False)[source]
Parameters
  • xx

  • edges

  • inverse

Returns