Format Convertor

The program, format_convertor, converts ligand files from one format to another format. It can also split a multiple-ligand SD file into single-ligand SD files.

The supported formats for formart conversion are:

  1. SD, SDF

  2. Mol, Mol2

  3. PDB

Help menu:

$SILCSBIODIR/programs/format_convertor

    --split        [MODE] split: split input SDF file into a folder
    --convert      [MODE] convert: convert input file into other format
    --inf FILE     *[INPUT] input file name
    --outf FILE    *[OUTPUT] output file/folder name
    --iformat arg  *[FORMAT] input file format: PDB, MOL2, SDF, MOL
    --oformat arg  *[FORMAT] out file format: PDB, MOL2, SDF, MOL
-v, --verbose      verbose output
-h, --help         print help

Example usage for spliting one multiple-ligand SD file into single-ligand SD files:

Use a new output directory to avoid mixing molecule inventories.

$SILCSBIODIR/programs/format_convertor --split --inf i.sdf --outf dir

Example usage for converting a single-ligand SD file to a PDB file:

$SILCSBIODIR/programs/format_convertor --convert --inf i.sdf --outf o.pdb --iformat SDF --oformat PDB

Input/output contract

See CLI Inputs, Outputs, and Workflow Handoffs. --convert uses --inf as a structure file and --outf as an output file; specify --iformat and --oformat explicitly. --split uses --inf as a multi-record SD file and --outf as a destination directory of individual molecules. Use a new destination to avoid mixing outputs from different inventories.

Check molecule count, names, atom/bond identity, hydrogens, and coordinates after conversion. PDB does not preserve all SDF properties or Mol2 typing/bond information; converting formats does not parameterize a ligand, assign the desired protonation state, or create SILCS atomic GFE annotations.