TDT - Syntax for a Thor Data Tree (TDT)
The TDT format is an ASCII format used by many Daylight applications to
handle various data, both structural and non-structural. TDT files or
streams consist of one or more TDTs. Thor Data Trees are also
objects at the Thor Toolkit level, but this document is
specifically about the ASCII TDT format.
Each TDT is comprised of the following subunits, in descending
Each TDT must begin with an identifier dataitem. If this dataitem
is not a SMILES ($SMI), there may be only one sub-tdt and one
identifier dataitem in the TDT.
- Each sub-tdt consists of exactly one identifier dataitem
followed by zero or more non-identifier dataitems.
- Each dataitem begins with a datatag consisting of one
or more non-blank non-special characters followed by
the data enclosed in angle brackets, e.g.,
There are two types of dataitems, identifier dataitems
and non-identifier dataitems. Identifier datatags
begin with '$' and non-identifier datatags do not.
Here is a non-identifier dataitem with three datafields.
- Each dataitem consists of one or more datafields.
Datafields are separated by the semicolon character.
Here is a dataitem with six datafields:
- subfields (obsolete)
- Some obsoleted datatypes used multiple subfields within
one datafield, separated by the tilde character '~'.
The fourth datafield in the following dataitem consists
of three subfields separated by tildes (these subfields
happen to be indirect references, but this is irrelevant
to the TDT format).
Each TDT terminates with the vertical bar character '|'.
Whitespace between dataitems, sub-tdts, and TDTs is ignored.
- Special Characters
- The following are special characters used in TDT formatting and
must be quoted according to the TDT quoting rules to be used
$ dollar sign
< less than sign
> greater than sign
~ tilde (obsolete)
| vertical bar
" double-quote character
- Quoting Rules
- If a datafield contains any special characters, the datafield
must be quoted correctly or the TDT is illegal. If a datafield
does not contain any special characters, it may be quoted or
If a datafield contains no double-quote characters, it may be
quoted correctly by simply enclosing the datafield in double-
quote characters. In the following example, the second
datafield is correctly quoted.
If a datafield does contain one or more double-quote characters,
each double-quote character must be replaced with two
double-quote character, then the entire dataitem must be
enclosed in double-quote characters. E.g.,
REM<"He said ""Try weakly"", not ""Tri-weekly.""">
- List vs. Dump Format
- For ease of handling, two TDT file formats are defined.
List format means one line per dataitem and one line for the
vertical bar. Dump format means one line per TDT. The two
formats are identical in meaning.
Here's an example of a TDT in list format (with indentations for
clarity) consisting of six sub-TDTs (including the root sub-TDT).
Not all Daylight applications handle TDTs not in list or dump format.
Daylight applications do not handle newlines as data consistently.
Daylight Chemical Information Systems, Inc.