Custom Webservice in Name Import


    It is possible to extend the name to structure conversion, for instance to support corporate IDs such as ABC0001234, or to make use of common name dictionaries in addition to the default one. By creating a webservice to do so, an organization can allow all its members to make use of the extended conversions.


    To start making use of a webservice, you need to know the URL of the service, which can be provided to you by your organization. In MarvinSketch or MarvinView, open the Edit/Preferences dialog from the menu bar, chose the Save/Load tab, then enter the URL in the "Name import service URL" field.

    It is sometimes desirable to configure a custom webservice without manually using MarvinSketch, for instance for automated installation or for a server running JChem Webservices. In such case, the configuration can be done by including a line of the form nameIOServiceURL = [URL] in the file inside the ChemAxon configuration folder The ChemAxon configuration folder is a location on disk where configuration is stored for various ChemAxon products.

    The location of this folder depends on the operating system used:

    • Windows Vista or above: C:\Users\ USERNAME \chemaxon

    • Windows XP: C:\Documents and Settings\ USERNAME \chemaxon

    • Linux: /home/ USERNAME /.chemaxon

    • OS X: /Users/ USERNAME /.chemaxon

    For instance:

     nameIOServiceURL =

    It is also possible to configure the webservice by setting the Java system property chemaxon.naming.n2s.webservice. In custom applications, this can be done by setting that property on the java command line, or using the System.setProperty method in custom code before starting to use the ChemAxon API.

    Writing a webservice

    By default, the request URL is constructed by appending the input name to the configured URL. The URL could for instance be

    If the name should be in the middle of the URL instead of the end, this can be done by using the special marker [NAME] at the desired location of the URL. For instance, if the URL is configured to[NAME]/option, then when querying the name "cxn123", the URL used will be

    The webservice can respond to the request with a plain text response containing the structure in any format recognized by marvin, for instance SMILES, InChI, MOL, SD file or mrv. It should respond with a 404 HTTP error if the input is not recognized as a known structure.