The chemobj command
This is an utility command to help with the generalization of commands applied to the various explicitly named chemistry objects in the toolkit.
The following subcommands are supported:
chemobj class
chemobj class objecthandle
Returns the class or
Tcl
command name associated with the major object identified by the handle. This command may also be invoked as
chemobj tclcommand.
chemobj eval
chemobj eval subcommandname objecthandle ?args?...
Execute the
Tcl
command associated with the object. The subcommand name, object handle and optional arguments are all passed to that object-specific command in that order.
This command is intended to make it easier to exploit the regular structure of the chemistry
Tcl
commands, providing an easy method to invoke the same functionality on different kinds of major objects without the need to inspect the handles or perform other checks to identify the object type. This command invokes the original class command. It does not perform error checking on its own. It is only safe to be used with subcommands which use identical syntax, or at least an identical syntax with a specific argument set, for all object classes a script is expected to encounter.
Example:
chemobj eval purge $handle $proplist
Above command purges the properties in the list from the passed object, regardless whether the object is, for example, an ensemble, a reaction, a dataset or a table.
chemobj get
chemobj get class/handle attribute
Query information on a chemistry object class. The identifier may either be a class name, as returned by
chemobj list
, or, for major objects, a valid object handle. The following attributes are recognized:
-
affiliation
The institution the author works for.
-
author
The author of the object class.
-
authorurl
A URL with information on the author, or an empty string if unset.
-
class
The class name of the object class, which is also the name of the associated
Tcl
command. This is the same as the
tclcommand
attribute.
-
classuuid
The base class UUID of this object class.
-
comment
A free-form string comment on the object class.
-
date
The data the module source was last modified.
-
doi
A digital object identifier for the object class, if defined.
-
email
The email address of the author of the object class.
-
infourl
A URL with information on the object class, or an empty string if unset.
-
keywords
A list of keywords associated with the object class.
-
labelproperty
The name of the property which is used for set minor object labels, e.g.
A_LABEL
for the atom class, and an empty string for ensembles.
-
license
The license class associated with this object class. Setting the license to a standard type updates the associated URL with a standard location.
-
licenseurl
A URL with details about the object class license.
-
literature
A free-form literature reference.
-
name
The primary name of the object class.
-
orcid
The ORCID code of the author (see www.orcid.org).
-
ownerclass
The class name of the major object which controls objects of this class, e.g
ens
for atom. For major objects, the class and owner class are the same.
-
path
The repository path for displaying hierarchical repository trees. This attribute is independent of any file system paths.
-
propertyprefix
The standard prefix (without the underscore) for the names of properties associated with this object class.
-
references
Cross references of the object class. This is a nested list of class UUIDs and reference type tags.
-
regid
A numerical registration ID assigned to registered object classes.
-
tclcommand
The same as the class attribute.
-
version
The version of the object class.
-
versionuuid
The UUID associated with this object class version.
chemobj list
chemobj list ?pattern?
List the currently loaded chemistry object classes with their primary name.
chemobj tclcommand
chemobj tclcommand objecthandle
Returns the class or
Tcl
command name associated with the major object identified by the handle. This command may also be invoked as
chemobj class.