coulomb_mc.mc_short_range module

This module implements helper functionality for computing the energy differences relating to non-bonded interactions, e.g. Lennard-Jones.

class coulomb_mc.mc_short_range.NonBondedDiff(state, types, boundary_condition, cutoff, interaction_func)

Bases: object

accept(move, energy_diff=None)

Accept a proposed move. Note the move does not have to be “proposed” before it can be accepted.

Parameters
  • move – tuple (id, new_position) that identifies the move.

  • energy_diff – float, new system total energy. If none (default) the energy will be computed.

initialise()

Initialise the instance. Must be called before moves are proposed or accepted.

propose(move)

Get the energy difference of a proposed move.

Parameters
  • move – Tuple (id, new_position) that represents the proposed move.

  • use_one_call – Bool (default True) that chooses between multiple library calls or the agregated call.