BOND_LEN : Double- Totality: total
Visibility: export record PlaceST : Type -> Nat -> Type Internal state for iteratively placing (parts of) the atoms
in a molecule.
It keeps track of the atoms that have been placed so far
but also of the current center of the placed atoms.
Totality: total
Visibility: export
Constructor: PST : MArray s k (Maybe (Point Mol)) -> Ref s MolPoint -> Ref s Nat -> PlaceST s k
Projections:
.placed : PlaceST s k -> Ref s Nat .pos : PlaceST s k -> MArray s k (Maybe (Point Mol)) .psum : PlaceST s k -> Ref s MolPoint
placeST : (k : Nat) -> F1 s (PlaceST s k) Creates a new state for coordinate generation with all
coordinates being currently unset and the current center
at the origin.
Totality: total
Visibility: exportplace : PlaceST s k => Fin k -> Point Mol -> F1' s Sets the coordinate of the given node.
This can also be used to re-place a node that was already
placed. The center of all placed nodes is updated accordingly.
Totality: total
Visibility: exportunplace : PlaceST s k => Fin k -> F1' s Marks the given node as unplaced by removing its
entry from the array of coordinates and adjusting the
center of placed nodes accordingly.
In case the node is already unset, this is a no-op.
Totality: total
Visibility: exportnodePosition : PlaceST s k => Fin k -> F1 s MolPoint Returns the current coordinate of the given node.
Returns the origin in case the node is currently unplaced.
Totality: total
Visibility: exportbondVector : PlaceST s k => Fin k -> Fin k -> F1 s MolVector Returns the vector connecting the two nodes by subtracit
the position of `x` from the one of `y`.
Totality: total
Visibility: exportisPlaced : PlaceST s k => Fin k -> F1 s Bool True, if the given node is currently placed.
Totality: total
Visibility: exportcenter : PlaceST s k => F1 s MolPoint Returns the center of the currently placed nodes.
Totality: total
Visibility: exportcenterOf : PlaceST s k => List (Fin k) -> F1 s MolPoint Computes the center of the given nodes.
This uses `nodePosition` internally, therefore, if one of the
has not yet been placed, it will be placed at the origin.
Totality: total
Visibility: exportgetPoints : PlaceST s k -> F1 s (IArray k (Point Mol)) Returns the current node positions in an immutable array.
Unplaced nodes will be put at the origin.
Totality: total
Visibility: exportadjPoint : PlaceST s k => (Point Mol -> Point Mol) -> Fin k -> F1' s Adjusts the position of the given node by applying the
given function.
Totality: total
Visibility: export