JOELib Tutorial: A Java based cheminformatics/computational chemistry package | ||
---|---|---|
Prev | Chapter 10. Example applications | Next |
Example application for file conversion, descriptor calculation and process filters. Additionally this example can be used to check a molecule file for correctness and store invalid or empty molecules (if [-e] option is activated) in a skip file. Because this example uses another loading mechanism, not all input formats are supported until now. Supported input file formats are SDF, SMILES, Flat and XYZ.
sh convertSkip.sh [-? | --help] [-h] [+h] [+p] [-e] [-d] [+d] [+v] [+snd] [+sad] [+sall] [-salt] [-iinputFormat] [-ooutputFormat] [+xdescriptorName] [-rskipDescRule] [+rdescRule] [+flineStructure] [+slineStructure] inputFile [outputFile] [skipFile]
[-? | --help]
Shows the help screen including all available input/output formats and all native value descriptors.[-h]
Removes all hydrogens from the molecule.[+h]
Adds hydrogens to molecule.[+p]
Adds only polar hydrogens to molecule.[-e]
Converts only non-empty molecules.[-d]
Removes all descriptors from molecule.[+d]
Adds all available descriptors to molecule, which can be calculated by using JOELib.[+v]
Switches verbosity mode ON.[+sall]
Shows all available descriptors, which can be calculated by using JOELib.[-salt]
Strip salts and gets only largest contigous fragment.[+snd]
Shows all available native value descriptors, which can be calculated by using JOELib.[+sad]
Shows all available atom property descriptors, which can be calculated by using JOELib.[-iinputFormat]
Format of the input file.[-ooutputFormat]
Format of the output file.[+xdescriptorName]
Converts only molecules, where this descriptor exist. This command line parameter can occur multiple times.[-rskipDescRule]
Skips all molecules, where this descriptor rule fits. This command line parameter can occur multiple times.[+rdescRule]
Converts only molecules, where this descriptor rule fits. This command line parameter can occur multiple times.[+flineStructure]
Required if you use FLAT output format which other input format.[+slineStructure]
Can be used for an alternate SMILES entry line structure.inputFile
The input file. The input format will be estimated by using the file extension.[outputFile]
The output file. The output format will be estimated by using the file extension.[skipFile]
The skip file. The output format will be the same of the input format. All skipped molecules will be stored in this file.If no output file is defined, all molecules will be written to stdout. The skip file must have the same format as the input file. All skipped entries and empty entries (if -e was selected) were stored in the skip file.
Filter rules have the form: <native value descriptor><relation><value> where <relation> is <, <=, ==, >, >= or != Example: "+rNumber_of_halogen_atoms==2"
Example 10-3. Show help screen for ConvertSkip
java -cp joelib.jar joelib.test.ConvertSkip --helpshows the help screen
Example 10-4. Print molecules to standard output
java -cp joelib.jar joelib.test.ConvertSkip joelib/test/test.molPrints the molecule file to the screen.
Example 10-5. Write flat file
java -cp joelib.jar joelib.test.ConvertSkip resources/multiple.mol test.flat "-fID|TITLE|d1|d2|d3"Writes a flat file with line structure ID TITLE d1 d2 d3 to file test.flat.
Example 10-6. Using conversion rule
java -cp joelib.jar joelib.test.ConvertSkip resources/multiple.mol +h -e +xID\ test.sdf "+rNumber_of_halogen_atoms<=2"Converts all non-empty molecules where the number of halogen atoms is smaller or equal to two and the identifier ID exists. The accepted and protonated molecules will be written to test.sdf in MDL SDF file format.