Creates a reaction or molecule object, depending on the given string.
Creates a pattern.
Returns the string representation, in canonical or original order, of the given object, which may be a reaction or molecule.
Creates a path or substruct. Paths and substructs work the same for reactions and molecules; they just deal with the atoms and bonds.
Creates a stream of child objects over the given object. dt_next(), dt_count(), and dt_reset() behaves as expected for these streams.
Deallocates a molecule. If the molecule is a component in a reaction, it deallocates the molecule and removes it from the reaction. This causes streams over the reaction to be revoked, and forces the canonical SMILES for the reaction to be recalculated.
Now takes a reaction, molecule, path, or substruct (derived from a molecule or reaction) calculates a fingerprint for these object types.
Perform SMARTS match on the pattern, against the target. If atom maps are defined for the pattern and target, they are used in the match. "tar" can be a reaction or molecule.
Make a new, empty reaction (no components in it).
Add a component to a reaction object. Can add a molecule to a reaction, or a path to a reaction path. The "role" sets the role property of the molecule or path which is added. The molecule (or path) is copied before being added to its new parent reaction (or rpath), and the handle of the newly-created object is returned if the function is successful.
Get or set the mapclass value for an atom. Although the atom class property is used exclusively by the reaction toolkit (eg. for SMARTS searches), the atom does NOT have to be in a reaction for these functions to work.
Get or set the role of a molecule in a reaction, path in a reaction path or a pattern in a rpattern. dt_getrole() returns zero if the object is not part of the reaction object. Note, the "set" function is INTERNAL only. (It is used by dt_addcomponent()). From the users point of view, there is no way to change the "role" of a molecule in a reaction. The role is set when the component is added to the reaction, and can not be changed (short of deallocating the molecule and re-adding it).
Returns a smallish, unique integer for the object in its ancestor. "object" can be an atom or bond. Ancestor is either a molecule or reaction which is the parent or grandparent of "object". Note that the values returned for an object are stable only across the existance of derivitive objects; any operation which results in derivitive objects being deallocated (streams, paths, pathsets, over the ancestor) may cause the intuid values to change. This is different than dt_uid(), which guarnatees that its values are stable over the life of the object. This is an internal function.
Returns a smallish, unique integer guaranteed to be larger than the highest "intuid" which would be returned for any of the "type" objects over the ancestor. This value is only stable across the existance of derivitive objects. This is an internal function.
Gets a canorder or origorder stream over a molecule or reaction. For a molecule, canorder: ATOM, BOND, origorder: ATOM are valid. For a reaction: canorder: ATOM, BOND, MOL, origorder: ATOM, BOND, MOL are valid.NOTE: This should incorporate the fixed explicit/implicit hydrogen handling for Thor n-tuples.
Sets or gets the map string for an pattern. The values in the string are always interpreted relative to the original order of the "nodes" in the string used to create the rpattern (exclusive of agents). dt_mapstring(transform) gets the string given on input.
Make a transformation object. Map must be "right". There isn't much checking right now for this, mainly just the right number of map values for the nodes in the transformation.
Make a transformation object. Map is implied. Internally, it builds a map string like: "1,2,3,4,5,6....,1,2,3,4,5,6....." for as many atoms as there are in the transform. Probably will go away.
Gets a copy of the internal pattern object which the transform builds when making a reaction. This better match any reactions which are created when dt_transform() is applied, otherwise we're doing something wrong.
Apply the transform to the molecule or sequence of molecules given (som). Makes a sequence of reactions with the molecule(s) from som on one side, and the transformed molecules on the other. The direction is: DX_REVERSE or DX_FORWARD. If "limit" is 1, returns a single reaction. Otherwise, returns the exhaustive list of reactions as a sequence of reactions. Forward direction means that the molecules from som are reactants, and the transform is applied to make products. Reverse is the opposite.NOTE: Currently, the resulting reaction has the "transformed" nodes as "*" atoms, with their adjuncts containing the stringvalue for the node expression. This is bacause I'm currently allowing arbitrary SMARTS in transforms, and reconciling this with the input molecules is a problem. It would be possible to have SMARTS one one side of the transformation, and SMILES on the other. In general, however, we want transforms to be symmetrical (that is, one only needs one transform to represent both the forward and reverse versions of a reaction). In this case, we need to have a defined "intermediate" SMARTS, which is fully understandable.
This utility function can be used to set the atom map values for a reaction from its n-tuple order string (like in transforms, or rpatterns). NOTE: This is not implemented!!! (and may never be if we change the lexical SMILES and SMARTS.