MEDYAN.chem_newlink_2mon!
Tuple{MEDYAN.Context, Int64, Pair{MEDYAN.MonomerName, MEDYAN.MonomerName}, MEDYAN.Link2MonState}
chem_newlink_2mon!(c::Context, ltid::Int, endnames::Pair{MonomerName,MonomerName}, link_2mon_state::Link2MonState;
new_lid::Union{Nothing,Int64} = nothing,
)::Int64
chem_newlink_2mon!(c::Context, ltid::Int, endnames::Pair{MonomerName,MonomerName};
changedchemstate = (;),
changedmechstate = (;),
is_minimized = c.link_2mon_data[ltid].params.defaultstate.is_minimized,
new_lid::Union{Nothing,Int64} = nothing,
)::Int64
Add a new link_2mon with type id ltid
between monemers endnames
.
Return the link_2mon id.
Error if a link_2mon of the same type links the same monomers in the same order.
If the link2mon state isn’t provided, c.link*2mon*data[ltid].params.defaultstate
is new link2mon’s state, optionally modified by the changedchemstate
, changedmechstate
, and is_minimized
keyword arguments.
Keyword arguments changedchemstate
and changedmechstate
are namedtuples that shadow fields from the default chemstate and mechstate for the new link_2mon.
Keyword argument is_minimized
can be used to set the new link*2mon’s is*minimized
state.
Keyword argument new_lid
can be optionally used to set the new link_2mon’s id, if this id is currently used, error.