cxcalc integration

    Introduction

    Cxcalc is a command-line tool that can perform chemical calculations in batch mode. It can invoke all calculations that are available in MarvinSketch, and since Marvin version 5.6 it can also run external services. As Marvin saves the configuration of the services into an XML file, services that were previously set can be used in cxcalc without any further setup. To execute the external service in cxcalc its name or the alias of the service can be used to execute it.

    To see the help of a service calculation in cxcalc, execute the cxcalc <name> -h command, where name is the name of the calculation. As an example see the command-line help for the hellomolecule command.

    images/download/attachments/20424603/image2015-12-10_16_21_19.png

    To execute the hellomolecule calculation run the cxcalc hellomolecule <input file/strings> command. It will run the calculation with the default settings. To run the calculation in batch mode you should simply replace the single molecule parameter with an input file. An example could be:

    images/download/attachments/20424603/image2015-12-10_16_26_11.png

    The parameters of the calculation can be set using the --<parameter_name> <parameter value> command-line options. For example to output molecule names you can use the name:t format option:

    images/download/attachments/20424603/image2015-12-10_16_41_54.png

    Accessing Parameters

    The following example illustrates the connection between the service and cxcalc parameters. In this case, we want to calculate the number of microspecies at a given pH for a molecule.

    images/download/attachments/20424603/image2015-12-10_16_48_34.png

    The default service and parameter names can be defined using the @Alias annotation:

    
    @Alias(name="MSCount", params={"mol", "pH"})
    @Description("Counts microspecies of the given molecule at " +
    "given pH.")
    public Integer getMicrospeciesCount(Molecule mol, Double pH)

    The default settings can be overwritten during the set-up. Next, we will modify the name and parameter names of the MSCount calculation.

    images/download/attachments/20424603/image2015-12-11_11_29_57.png

    After the modification, the calculation is also accessible as MSC , and the -pH command line parameter can also be referred to as --H, too.

    images/download/attachments/20424603/image2015-12-11_11_58_22.png

    If no pH parameters are set, the default is used. (pH 7.4)

    Additional cxcalc Parameters

    Calculated properties can also be stored as a molecule property:

    images/download/attachments/20424603/image2015-12-11_12_3_3.png

    The visualized result is:

    images/download/attachments/20424603/image2015-12-11_12_5_0.png

    {info} Built-in and external calculations can be called at the same time, too.