coniii.enumerate_potts module

class coniii.enumerate_potts.PythonFileWriterBase(n, k)

Bases: object

energy_terms_generator()

Generator for iterating through all possible states and yield the energy expression as well as the configuration of spins.

write(fname)

Write equations to file.

class coniii.enumerate_potts.SpecificFieldGenericCouplings(n, k)

Bases: coniii.enumerate_potts.PythonFileWriterBase

This version specifies a field for every distinct Potts state, but considers correlation averaged over all possible states as long as they agree.

When writing the equations, the fields are assumed to first increase by spin index then by state index (fields for the n spins for k=0 come first, then for k=1, etc.). The couplings come after in the conventional order of ij where j increases up to i before i is incremented.

energy_terms_generator()

Generator for iterating through all possible states and yield the energy expression as well as the configuration of spins. The energy expression is returned as a string and assumes that the field come first followed by the couplings.

coniii.enumerate_potts.insert_newlines(s, n)

Insert character every n in list.

coniii.enumerate_potts.split_string(s, n)

Insert character every n.