class MacrostateMorph : public feasst::Macrostate

For use with TrialMorphExpanded.

The particle_type_growth_sequence (PTGS) argument is as follows.

The first index represents individual macrostates. Thus, if the first index is of size 2, the Histogram width should be set equal to 1/PTGS, which means that macrostates would be 0, 0.5, 1.0, 1.5, …

The second index represents the (multiple) particles that are to be morphed.

For example, PTGS={{1},{0}}, would mean to insert a particle of type 1 to transition to a half macrostate value, and morph particles of type 1 into type 0 to obtain integer macrostates. The reverse at integer macrostates would be to randomly select a particle of type 0 and shrink it into a particle of type 1. The reverse at half macrostate would be to delete particles of type 1.

Thus, assuming particle type 1 is not physically and introduced only to help sampling, the integer macrostates should contain only particles of type 0. Thus, there should only be particles of type 1 present at half macrostates.

In a more complex example for divalent ions, PTGS={{2, 3, 3}, {0, 1, 1}} if particles of type 0 have twice the charge of particles of type 1. In this case, we begin by adding partial particles of types 2 and 3 at the half macrostate. Those particle particles are then morphed into full particles of types 1 and 0 when transitioning to integer macrostate values.

Public Functions

double value(const System &system, const Criteria &criteria, const Acceptance &acceptance) const

Return the current value of the macrostate.