nvMolKit APIs#

Fingerprint Generation#

fingerprints.MorganFingerprintGenerator(...)

Morgan fingerprint generator.

fingerprints.pack_fingerprint(fp)

Pack a 2D boolean tensor of shape (n_fps, fingerprint_size) into a 32-bit integer-encoded fingerprint.

fingerprints.unpack_fingerprint(fp)

Unpack a 32-bit integer-encoded fingerprint into a 2D boolean tensor of shape (len(fp), fingerprint_size).

Similarity Calculations#

similarity.crossTanimotoSimilarity(...[, ...])

Returns the Tanimoto similarity within a set of fingerprints or between two sets of fingerprints.

similarity.crossTanimotoSimilarityMemoryConstrained(...)

Returns the Tanimoto similarity within a set of fingerprints or between two sets of fingerprints.

similarity.crossCosineSimilarity(...[, ...])

Returns the Cosine similarity between two sets of fingerprints.

similarity.crossCosineSimilarityMemoryConstrained(...)

Returns the Cosine similarity between two sets of fingerprints.

similarity.aap_similarity(left, right, *[, ...])

Compute approximate Atom-Atom Path (AAP) similarity between two molecules.

similarity.TanimotoMetric()

Tanimoto similarity on packed fingerprints for fused clustering and selection.

similarity.CosineMetric()

Cosine similarity on packed fingerprints for fused clustering and selection.

similarity.AAPMetric([max_path_length, ...])

Approximate Atom-Atom Path (AAP) similarity on RDKit molecules.

ETKDG Conformer Generation#

embedMolecules.EmbedMolecules(-> None)

Embed multiple molecules with multiple conformers on GPUs.

MMFF Optimization#

mmffOptimization.MMFFOptimizeMoleculesConfs(...)

Optimize conformers for multiple molecules using MMFF force field.

batchedForcefield.MMFFBatchedForcefield(...)

Evaluate MMFF energies and gradients or run BFGS minimization for molecule batches.

batchedForcefield.MMFFBatchElement(parent, idx)

Per-molecule view for configuring one molecule in an MMFF batch.

UFF Optimization#

uffOptimization.UFFOptimizeMoleculesConfs(...)

Optimize conformers for multiple molecules using the UFF force field.

batchedForcefield.UFFBatchedForcefield(molecules)

Evaluate UFF energies and gradients or run BFGS minimization for molecule batches.

batchedForcefield.UFFBatchElement(parent, idx)

Per-molecule view for configuring one molecule in a UFF batch.

Clustering#

clustering.butina(...)

Perform Butina clustering on a distance matrix.

clustering.fused_butina(...)

Perform Butina clustering on fingerprints, computing distances as needed.

clustering.dise(distance_matrix, cutoff, *)

Cluster a distance matrix by directed sphere exclusion (DISE).

clustering.fused_dise(x, cutoff, *[, ...])

Cluster by directed sphere exclusion (DISE), computing distances as needed.

clustering.OutputMode(*values)

Result representation for clustering and selection functions.

clustering.ClusterDeviceResult(cluster_ids, ...)

Device-resident clustering result.

Diversity Selection#

pickers.leader(distance_matrix, cutoff, *[, ...])

Select leaders from a distance matrix by sphere exclusion.

pickers.fused_leader(x, cutoff, *[, metric, ...])

Select leaders by sphere exclusion, computing distances as needed.

pickers.maxmin(distance_matrix, pick_size, *)

Select a diverse subset from a distance matrix by greedy MaxMin.

pickers.fused_maxmin(x, pick_size, *[, ...])

Select a diverse subset by greedy MaxMin, computing distances as needed.

Maximum Common Substructure (MCS)#

mcs.findMCS(mols, *[, mode, pairs, mols_b, ...])

Find maximum common substructures for a batch of molecule pairs.

mcs.MCSConfig([batchSize, workerThreads, ...])

Configuration for GPU MCS execution.

mcs.MCSBatchResult(pairs, mode, num_atoms, ...)

Flat batch of MCS results in generated-pair order.

mcs.MCSResult(pair, num_atoms, num_bonds, ...)

Result for one molecule pair.

Conformer RMSD#

conformerRmsd.GetConformerRMSMatrix(mol[, ...])

Compute the pairwise RMSD matrix between all conformers of a molecule on GPU.

conformerRmsd.GetConformerRMSMatrixBatch(mols)

Compute pairwise RMSD matrices for a batch of molecules on GPU.

3D Descriptors#

descriptors3d.Calc3DProperties(mols, ...[, ...])

Calculate selected 3D properties for every conformer in a molecule batch.

descriptors3d.Property3D(*values)

3D properties implemented by Calc3DProperties().

descriptors3d.Device3DPropertyResult(...)

Per-conformer 3D properties on the GPU, labeled by molecule and conformer.

descriptors3d.Dense3DPropertyResult(values, ...)

Dense padded view of a Device3DPropertyResult.

descriptors3d.Property3DOptions([moments, ...])

Per-family options for Calc3DProperties(); each family reads only its own member.

descriptors3d.MomentOptions([useAtomicMasses])

Options for the moment-based properties (PMI, NPR, radius of gyration and derived shape indices).

descriptors3d.WhimOptions([threshold])

Options for Property3D.WHIM.

descriptors3d.GetawayOptions([precision])

Options for Property3D.GETAWAY.

Torsion Fingerprint Deviation (TFD)#

tfd.GetTFDMatrix(mol[, useWeights, maxDev, ...])

Calculate the TFD matrix for conformers of a molecule.

tfd.GetTFDMatrices(mols[, useWeights, ...])

Calculate TFD matrices for multiple molecules.

Types#

types.AsyncGpuResult(obj[, gpu_id])

Handle to a GPU result.

types.FireOptions()

Configures the FIRE minimizer.

types.HardwareOptions([...])

Configures GPU hardware settings for batch operations.

Hardware Autotuning (optional optuna extra)#

autotune.is_available()

Return True if autotune dependencies are present (currently optuna).

autotune.tune_embed_molecules(molecules, ...)

Tune HardwareOptions for EmbedMolecules() on this hardware.

autotune.tune_mmff_optimize(molecules, *[, ...])

Tune HardwareOptions for MMFFOptimizeMoleculesConfs().

autotune.tune_uff_optimize(molecules, *[, ...])

Tune HardwareOptions for UFFOptimizeMoleculesConfs().

autotune.tune_batched_forcefield(molecules, ...)

Tune HardwareOptions for a batched-forcefield workflow.

autotune.tune_substructure(targets, queries, ...)

Tune SubstructSearchConfig for a substructure-search workflow.

autotune.tune_mcs(mols, pairs, *[, ...])

Tune MCSConfig for an explicit-pair, GPU-required MCS workload.

autotune.save(config, path)

Persist config to a JSON file at path.

autotune.load(path)

Load a configuration object previously saved with save().

autotune.TuneResult(best_config, ...)

Result returned by every tune_* wrapper.