IUPAC name generator

API

Marvin provides an API so that names can also be generated from Java programs. Given a chemaxon.stuc.Molecule object m, its name can be computed by using:

String name = m.toFormat("name");

Options

Nomenclature options

It is possible to use a format option to chose a nomenclature style: For instance, to generate traditional names, use the following:
String tradionalName = m.toFormat("name:t");

Timeout

By default, naming computation will timeout after a certain number of seconds. This is used to ensure batch naming terminates in a reasonable time, even in the presence of very complicated structures that would take too long to name or of bugs in the naming program. If you experience timeouts, you can set a higher custom timeout value to try to get the naming to succeed. Alternatively, you can also reduce the timeout to avoid slowing down the batch naming process. The timeout can be set as an export option, with the format name:timeout=N, where N is the timeout value, expressed in seconds.

For instance, to compute the name of a molecule during up to 5 seconds, use:

try {
	String name = m.toFormat("name:timeout=5");
	...
}
catch (IUPACNamer.TimeoutError e) {
	...
}

General information

For general information about the IUPAC name generator, see the user documentation.