Repository revision
14:e2c36f62e22f

Repository 'openbabel_compound_convert'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert

Compound conversion tool metadata
Miscellaneous
- interconvert between various chemistry and molecular modeling data files
openbabel_compound_convert
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/3.1.1+galaxy0
3.1.1+galaxy0
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/3.1.1+galaxy0 (this tool)
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/2.4.2.2.0
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/2.4.2.1.0
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/2.4.2.0
toolshed.g2.bx.psu.edu/repos/bgruening/openbabel_compound_convert/openbabel_compound_convert/2.4.1.0
openbabel_compound_convert
Requirements (dependencies defined in the <requirements> tag set)
name version type
openbabel 3.1.1 package
python 3.6 package
Additional information about this tool
#set $format = $oformat.oformat_opts_selector

    #if $format == 'fs':
        ## For the fastsearch index we need to copy the original molecule files to the composite datatype of obfs.
        ## Because openbabel likes file extensions, we give the molecule file a proper file extension.
        mkdir $outfile.files_path;
        cp '${infile}' ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )};
    #end if

    #if $split == 'true':
        mkdir output &&
    #end if

    obabel -i '${infile.ext}'

        #if $format == 'fs':
            ## the fs filetype need his own symlink path, all others can take the original ones
            ${os.path.join($outfile.files_path, 'molecule.%s' % $infile.ext )}
            -o '$format' -e
            -O ${os.path.join($outfile.files_path,'molecule.fs')}
            #if int($oformat.fs_fold) > 0:
                -xN$oformat.fs_fold
            #end if
            ${oformat.fs_fptype}
        #else:
            '${infile}'
            -o '${format}'
            #if $split == 'true':
                -O 'output/molecule.$format'
                -m
            #else:
                -O '${outfile}'
            #end if
            -e
        #end if

        #if $format == 'cml':
            $oformat.cml_array
            $oformat.cml_cml1
            $oformat.cml_aromatic
            $oformat.cml_hydrogen
            $oformat.cml_metadata
            $oformat.cml_omit
            $oformat.cml_continuous
            $oformat.cml_properties
            $oformat.gen2d
            $oformat.gen3d
        #elif $format == 'inchi':
            ## Ignore less import warnings
            -w
            #if $oformat.inchi_truncate:
                #set $truncate = ''.join( str( $oformat.inchi_truncate ).split( ',' ) )
                -xT ${truncate}
            #end if

            #if $oformat.inchi_additional:
                #set $additional = ' '.join( str( $oformat.inchi_additional ).split( ',' ) )
                -xX '${additional}'
            #end if

            $oformat.inchi_key
            $oformat.inchi_name
            $oformat.inchi_unique
            $oformat.inchi_unique_sort
        #elif $format == 'can':
            $oformat.can_exp_h
            $oformat.can_iso_chi
            $oformat.can_rad
            $oformat.can_atomclass_out
        #elif $format == 'smi':
            $oformat.smi_exp_h
            $oformat.smi_iso_chi
            $oformat.smi_rad
            $oformat.smi_atomclass_out
            $oformat.smi_can
            $oformat.smi_coordinates
        #elif $format == 'sdf':
            $oformat.sdf_exp_h
            $oformat.sdf_no_prop
            $oformat.sdf_wedge_bonds
            $oformat.sdf_alias_out
            $oformat.gen2d
            $oformat.gen3d
        #elif $format == 'fpt':
            $oformat.fpt_fptype
            #if int($oformat.fpt_fold) > 0:
                $oformat.fpt_fold
            #end if
            $oformat.fpt_hex_multiple
            $oformat.fpt_hex
            $oformat.fpt_set
            $oformat.fpt_unset
        #elif $format == 'mol2':
            $oformat.mol2_ignore_res
            $oformat.gen2d
            $oformat.gen3d
        #end if

        ## Uniqueness according to stripped InChI's or canonical SMILES
        #if str($unique.unique_opts_selector):
            #if $unique.unique_opts_selector == 'inchi':
                #if $unique.truncate:
                    #set $truncate = ''.join( str( $unique.truncate ).split( ',' ) )
                    --unique $truncate
                #end if
            #else
                --unique $unique.unique_opts_selector
            #end if
        #end if

        #if str($appendtotitle).strip():
            --addtotitle '${appendtotitle}'
        #end if

        $remove_h
        $dative_bonds

        #if float($ph) >= 0:
            -p $ph
        #end if


    
None
False
Functional tests
name inputs outputs required files
Test-1 infile: CID_2244.sdf
oformat|oformat_opts_selector: cml
name: value
CID_2244.sdf
value
Test-2 infile: CID_2244.sdf
oformat|oformat_opts_selector: fs
name: value
CID_2244.sdf
value
Test-3 infile: CID_2244.sdf
oformat|oformat_opts_selector: inchi
name: value
CID_2244.sdf
value
Test-4 infile: CID_2244.sdf
oformat|oformat_opts_selector: pdb
name: value
CID_2244.sdf
value
Test-5 infile: CID_2244.sdf
oformat|oformat_opts_selector: can
name: value
CID_2244.sdf
value
Test-6 infile: CID_2244.sdf
oformat|oformat_opts_selector: sdf
name: value
CID_2244.sdf
value
Test-7 infile: 2_mol.smi
oformat|oformat_opts_selector: pdbqt
split: True
2_mol.smi