Ejemplo n.º 1
0
import os
import logging
import argparse
import sys

from python_utilities.scripting import setup_logging
from python_utilities.parallel import make_data_iterator, Parallelizer, \
                                      ALL_PARALLEL_MODES
from python_utilities.io_tools import touch_dir
from e3fp.config.params import read_params, get_default_value, get_value
from e3fp.conformer.util import mol_from_sdf, MolItemName
from e3fp.fingerprint.fprinter import Fingerprinter, BITS
from e3fp.fingerprint.db import FingerprintDatabase
import e3fp.fingerprint.fprint as fp

LEVEL_DEF = get_default_value("fingerprinting", "level", int)
RADIUS_MULTIPLIER_DEF = get_default_value("fingerprinting",
                                          "radius_multiplier", float)
FIRST_DEF = get_default_value("fingerprinting", "first", int)
COUNTS_DEF = get_default_value("fingerprinting", "counts", bool)
STEREO_DEF = get_default_value("fingerprinting", "stereo", bool)
INCLUDE_DISCONNECTED_DEF = get_default_value("fingerprinting",
                                             "include_disconnected", bool)
RDKIT_INVARIANTS_DEF = get_default_value("fingerprinting", "rdkit_invariants",
                                         bool)
EXCLUDE_FLOATING_DEF = get_default_value("fingerprinting", "exclude_floating",
                                         bool)

OUT_EXT_DEF = ".fp.bz2"

Ejemplo n.º 2
0
    ALL_PARALLEL_MODES,
)
from python_utilities.scripting import setup_logging
from python_utilities.io_tools import touch_dir, HDF5Buffer
from e3fp.config.params import read_params, get_default_value, get_value
from e3fp.conformer.util import (
    mol2_generator,
    smiles_generator,
    mol_from_mol2,
    mol_from_smiles,
    mol_to_sdf,
    mol_to_standardised_mol,
)
from e3fp.conformer.generator import FORCEFIELD_CHOICES, ConformerGenerator

STANDARDISE_DEF = get_default_value("preprocessing", "standardise", bool)
NUM_CONF_DEF = get_default_value("conformer_generation", "num_conf", int)
FIRST_DEF = get_default_value("conformer_generation", "first", int)
POOL_MULTIPLIER_DEF = get_default_value("conformer_generation",
                                        "pool_multiplier", int)
RMSD_CUTOFF_DEF = get_default_value("conformer_generation", "rmsd_cutoff",
                                    float)
MAX_ENERGY_DIFF_DEF = get_default_value("conformer_generation",
                                        "max_energy_diff", float)
FORCEFIELD_DEF = get_default_value("conformer_generation", "forcefield")
SEED_DEF = get_default_value("conformer_generation", "seed", int)
OUTDIR_DEF = get_default_value("conformer_generation", "out_dir")
COMPRESS_DEF = get_default_value("conformer_generation", "compress")


def generate_conformers(