Energies Module



Organizes diffent energy types. Add new interaction energies here.

All energies are assumed to be of the form E=cof*x where cof is some constant and x is some function that depends on the positions, types, and/or orientation of the monomers.

Quick access

Variables:bend_, bind_, chi_, confine_, couple_, energyof, explicitbinding_, external_, field_, global_twistliner_, global_twistquadratic_, internucleosome_, kap_, maiersaupe_, mu_, number_of_energy_types, self_, shear_, sterics_, stretch_, twist_, twobody_, umbrella_, umbrellaquadratic_
Routines:accept_all_energies(), apply_energy_ison(), calc_all_de_from_dx(), print_all_denergies(), set_all_denergy_to_zero(), set_all_energy_to_zero(), set_up_energyof(), sum_all_denergies()

Needed modules

  • precision (dp(), epsapprox(), pi())


  • type energies/mc_energy
    Type fields:
    • % cof [real] :: Energy coefficienet, e.g. chi, kap, …
    • % de [real] :: Change in energy
    • % dx [real] :: Change in x
    • % e [real] :: Energy in units of kT
    • % ind_on [integer] :: Time when to turn energy on
    • % ison [logical] :: Is energy type currently on?
    • % name_str [character(len=8)] :: Name for display
    • % parallel_temper [logical]
    • % x [real] :: Energy/cof, i.e. observable that energy depends on


  • energies/bend_ [integer,public/parameter/optional/default=6]

    Bending constant

  • energies/bind_ [integer,public/parameter/optional/default=13]

    Binding energy

  • energies/chi_ [integer,public/parameter/optional/default=1]

    Flory-Huggins chi parameter

  • energies/confine_ [integer,public/parameter/optional/default=16]

    Confinement energy

  • energies/couple_ [integer,public/parameter/optional/default=4]

    Coupling constant (e.g. HP1 oligomerization)

  • energies/energyof (22) [mc_energy,public]
  • energies/explicitbinding_ [integer,public/parameter/optional/default=15]

    Explicit Binding energy (e.g. LEFs)

  • energies/external_ [integer,public/parameter/optional/default=10]

    External potentail strength

  • energies/field_ [integer,public/parameter/optional/default=3]

    Applied field

  • energies/global_twistliner_ [integer,public/parameter/optional/default=19]

    Global twist linear portion

  • energies/global_twistquadratic_ [integer,public/parameter/optional/default=20]

    Global twist quadratic portion

  • energies/internucleosome_ [integer,public/parameter/optional/default=22]

    Internucleosomal potential

  • energies/kap_ [integer,public/parameter/optional/default=5]

    Incompresability parameter

  • energies/maiersaupe_ [integer,public/parameter/optional/default=9]

    Maier Saupe liquic crystal intercation

  • energies/mu_ [integer,public/parameter/optional/default=2]

    Chemical potential (e.g. of HP1)

  • energies/number_of_energy_types [integer,public/parameter/optional/default=22]
  • energies/self_ [integer,public/parameter/optional/default=14]

    Self interaction energy

  • energies/shear_ [integer,public/parameter/optional/default=8]

    Shear constant

  • energies/sterics_ [integer,public/parameter/optional/default=21]

    Steric collision energy when using GJK

  • energies/stretch_ [integer,public/parameter/optional/default=7]

    Stretch constant

  • energies/twist_ [integer,public/parameter/optional/default=12]

    Twist constant

  • energies/twobody_ [integer,public/parameter/optional/default=11]

    Two body interaction strength

  • energies/umbrella_ [integer,public/parameter/optional/default=17]

    Energy from umbrella sampling (linear partion)

  • energies/umbrellaquadratic_ [integer,public/parameter/optional/default=18]

    Quadratic energy from umbrella

Subroutines and functions

subroutine energies/set_up_energyof()

Set up energy module.

Called from:set_param_defaults()
subroutine energies/set_all_energy_to_zero()

Reset all dE, E, x, and dx values to zero.

Called from:initialize_wlcsim_data()
subroutine energies/set_all_denergy_to_zero()

Set all dE and dx values to zero

Called from:mcsim(), calculate_energies_from_scratch()
subroutine energies/sum_all_denergies(total_energy)

Sums total change in energy.

Parameters:total_energy [real,out]
Called from:mcsim()
subroutine energies/accept_all_energies()

Set E to E+dE because move has been accepted

Called from:mcsim()
subroutine energies/calc_all_de_from_dx()


Called from:mcsim(), calculate_energies_from_scratch()
subroutine energies/apply_energy_ison()

Zero energies that are off.

Called from:mcsim(), calculate_energies_from_scratch()
subroutine energies/print_all_denergies()

Print energie changes to standard out