# pymatgen.analysis.energy_models module¶

class EnergyModel[source]

Bases: monty.json.MSONable

Abstract structure filter class.

classmethod from_dict(d)[source]
get_energy(structure)[source]

Returns a boolean for any structure. Structures that return true are kept in the Transmuter object during filtering.

class EwaldElectrostaticModel(real_space_cut=None, recip_space_cut=None, eta=None, acc_factor=8.0)[source]

Wrapper around EwaldSum to calculate the electrostatic energy.

Initializes the model. Args have the same definitions as in pymatgen.analysis.ewald.EwaldSummation.

Parameters: real_space_cut (float) – Real space cutoff radius dictating how many terms are used in the real space sum. Defaults to None, which means determine automagically using the formula given in gulp 3.1 documentation. recip_space_cut (float) – Reciprocal space cutoff radius. Defaults to None, which means determine automagically using the formula given in gulp 3.1 documentation. eta (float) – Screening parameter. Defaults to None, which means determine automatically. acc_factor (float) – No. of significant figures each sum is converged to.
as_dict()[source]

A JSON serializable dict representation of an object.

get_energy(structure)[source]

Returns a boolean for any structure. Structures that return true are kept in the Transmuter object during filtering.

class IsingModel(j, max_radius)[source]

A very simple Ising model, with r^2 decay.

Parameters: j (float) – The interaction parameter. E = J * spin1 * spin2. radius (float) – max_radius for the interaction.
as_dict()[source]

A JSON serializable dict representation of an object.

get_energy(structure)[source]

Returns a boolean for any structure. Structures that return true are kept in the Transmuter object during filtering.

class NsitesModel[source]

Sets the energy to the number of sites. More sites => higher “energy”. Used to rank structures from smallest number of sites to largest number of sites after enumeration.

as_dict()[source]

A JSON serializable dict representation of an object.

get_energy(structure)[source]

Returns a boolean for any structure. Structures that return true are kept in the Transmuter object during filtering.

class SymmetryModel(symprec=0.1, angle_tolerance=5)[source]

Sets the energy to the -ve of the spacegroup number. Higher symmetry => lower “energy”.

Args have same meaning as in pymatgen.symmetry.finder.SpacegroupAnalyzer.

Parameters: symprec (float) – Symmetry tolerance. Defaults to 0.1. angle_tolerance (float) – Tolerance for angles. Defaults to 5 degrees.
as_dict()[source]

A JSON serializable dict representation of an object.

get_energy(structure)[source]

Returns a boolean for any structure. Structures that return true are kept in the Transmuter object during filtering.