Example #1
0
one of:

  File Type      Valid FORMATs
  ---------      -------------
   SMILES        smi, can, ism, smiles
   SDF           sdf, mol, sd, mdl
   RDF           rdf
   CML           cml

Indigo will automatically handle gzip'ed input data if the filename
ends with".gz". You may optionally include that suffix in the format name.

"""

parser = argparse.ArgumentParser(
    description="Generate FPS fingerprints from a structure file using Indigo",
)
group = parser.add_mutually_exclusive_group()
group.add_argument("--sim",
                   action="store_true",
                   help="similarity fingerprints")
group.add_argument("--sub",
                   action="store_true",
                   help="substructure fingerprints")
group.add_argument("--sub-res",
                   action="store_true",
                   help="resonance substructure fingerprints")
group.add_argument("--sub-tau",
                   action="store_true",
                   help="tautomer substructure fingerprints")
group.add_argument("--full", action="store_true", help="full fingerprints")
Example #2
0
                         (t2 - t1, t3 - t2, t3 - t1))


####


def int_or_all(s):
    if s == "all":
        return s
    return int(s)


# the "2fps" options need a way to say "get the options from --reference"
# ob2fps --reference targets.fps | simsearch -k  5 --threshold 0.5 targets.fps

parser = argparse.ArgumentParser(
    description="Search an FPS file for similar fingerprints")
parser.add_argument(
    "-k",
    "--k-nearest",
    help="select the k nearest neighbors (use 'all' for all neighbors)",
    default=None,
    type=int_or_all)
parser.add_argument("-t",
                    "--threshold",
                    help="minimum similarity score threshold",
                    default=None,
                    type=float)
parser.add_argument("-q",
                    "--queries",
                    help="filename containing the query fingerprints")
parser.add_argument(