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.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
nothing
not change the attached place. Set an element to a null place or tag to detach that place.state=(;)
: state properties to change.A
NamedTuple
of changes. For example,state = (;k1 = 3.6, k7 = 2.0,)
to changestate.k1
to3.6
andstate.k7
to2.0
.bond_states=()
: bond state properties to change.A
Tuple
of changes. 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].L0
to3.6
.bond_enabled=()
: bond enable flags to change.A
Tuple
ofUnion{Bool, Nothing}. If an element in the tuple is
nothing, 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
Tuple
ofNamedTuple
of changes. 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
nothing
not change the attached place. Set an element to a null place or tag to detach that place.state=(;)
: state properties to change.A
NamedTuple
of changes. For example,state = (;k1 = 3.6, k7 = 2.0,)
to changestate.k1
to3.6
andstate.k7
to2.0
.bond_states=()
: bond state properties to change.A
Tuple
of changes. 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].L0
to3.6
.bond_enabled=()
: bond enable flags to change.A
Tuple
ofUnion{Bool, Nothing}. If an element in the tuple is
nothing, 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
Tuple
ofNamedTuple
of changes. 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.