src/links/link-manager.jl
MEDYAN.num_link_types
MEDYAN.link_type_name
MEDYAN.link_typeid
MEDYAN.place2tag
MEDYAN.tag!
MEDYAN.has_tag
MEDYAN.tag2place
MEDYAN.get_position
MEDYAN.get_directions
Return the directions of x. N is from num_directions. Throw an error if x doesn’t exist.
MEDYAN.get_material_frame
Return the material frame of x. Throw an error if x doesn’t exist.
The first column is the first direction. The second column is the second direction. The third column is cross(dirs[1], dirs[2]) to complete the right handed frame.
MEDYAN.get_chem_state
MEDYAN.tag_exists
MEDYAN.get_all_tags
MEDYAN.link2tags
MEDYAN.get_state
MEDYAN.get_bond_states
MEDYAN.get_bond_enabled
MEDYAN.get_reaction_enabled
MEDYAN.is_minimized
MEDYAN.get_colvar_stats
Return the tuple of ColVarStats for the link, one per collective variable defined on its link type.
The stats are collected by baoab! and describe the configuration the link had during that run. They are NaN-filled until a run has collected them, and are reset to NaN by minimize_energy!, which doesn’t sample colvars, and by update_link! when it is passed reset_colvar_stats=true.
A colvar is only sampled while all of the places it reads are attached, so a colvar with any null input place will be reset to NaN after a full run.
Safe to read from a link reaction rate callback on link.
Throw an error if link doesn’t exist.
MEDYAN.get_colvar_thresholds
MEDYAN.link_exists
MEDYAN.place2links
MEDYAN.tag2links
MEDYAN.make_link!
Return the new link.
The type keyword argument is required.
The other keyword arguments can be used to change the link from default.
Keyword Arguments
type::Union{Symbol,Integer}: the link type id or symbol.places=(): places or tags to attach to the link.Set an element to
nothingto not change the attached place. Set an element to a null place or tag to detach that place.state=(;): state properties to change.A
NamedTupleof changes. For example,state = (;k1 = 3.6, k7 = 2.0,)to changestate.k1to3.6andstate.k7to2.0.bond_states=(): bond state properties to change.A
TupleofNamedTupleornothing. If an element in the tuple isnothing, the corresponding bond state isn’t changed. For example,bond_states = (nothing, (;L0 = 3.6,))to changebond_states[2].L0to3.6.colvar_thresholds=(): colvar thresholds to change.A
Tupleofnothing,Real, orAbstractVector. If an element in the tuple isnothing, the corresponding colvar threshold isn’t changed. ARealis accepted for a 1-dimensional colvar; otherwise a length-Dvector is required. For example,colvar_thresholds = (nothing, 2.7)to leave colvar 1’s threshold unchanged and set colvar 2’s threshold to2.7. Seeget_colvar_thresholds.bond_enabled=(): bond enable flags to change.A
TupleofUnion{Bool, Nothing}. If an element in the tuple isnothing, the corresponding bond enable flag isn’t changed. For example,bond_enabled = (nothing, true, false)to not change bond 1, enable bond 2, and disable bond 3.reaction_enabled=(): reaction enable flags to change.A
TupleofNamedTupleornothing. If an element in the tuple isnothing, the corresponding reaction enable flags aren’t changed. For example,reaction_enabled = (nothing, (;a=true, b=false))to not change any reactions on place 1, enable reaction a on place 2, and disable reaction b on place 2.is_minimized::Bool=false: is the link marked as minimized.By default links are marked as minimized at the end of mechanics when updated.
MEDYAN.remove_link!
MEDYAN.update_link!
Update the link.
Keyword Arguments
places=(): places or tags to attach to the link.Set an element to
nothingto not change the attached place. Set an element to a null place or tag to detach that place.state=(;): state properties to change.A
NamedTupleof changes. For example,state = (;k1 = 3.6, k7 = 2.0,)to changestate.k1to3.6andstate.k7to2.0.bond_states=(): bond state properties to change.A
TupleofNamedTupleornothing. If an element in the tuple isnothing, the corresponding bond state isn’t changed. For example,bond_states = (nothing, (;L0 = 3.6,))to changebond_states[2].L0to3.6.colvar_thresholds=(): colvar thresholds to change.A
Tupleofnothing,Real, orAbstractVector. If an element in the tuple isnothing, the corresponding colvar threshold isn’t changed. ARealis accepted for a 1-dimensional colvar; otherwise a length-Dvector is required. For example,colvar_thresholds = (nothing, 2.7)to leave colvar 1’s threshold unchanged and set colvar 2’s threshold to2.7. Seeget_colvar_thresholds.bond_enabled=(): bond enable flags to change.A
TupleofUnion{Bool, Nothing}. If an element in the tuple isnothing, the corresponding bond enable flag isn’t changed. For example,bond_enabled = (nothing, true, false)to not change bond 1, enable bond 2, and disable bond 3.reaction_enabled=(): reaction enable flags to change.A
TupleofNamedTupleornothing. If an element in the tuple isnothing, the corresponding reaction enable flags aren’t changed. For example,reaction_enabled = (nothing, (;a=true, b=false))to not change any reactions on place 1, enable reaction a on place 2, and disable reaction b on place 2.is_minimized::Bool=false: is the link marked as minimized.By default links are marked as minimized at the end of mechanics when updated.
reset_colvar_stats::Bool=false: reset the link’sColVarStatstoNaN, discarding the stats collected by the lastbaoab!run.By default the stats are kept. See
get_colvar_stats.