This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Program to generate SMILES strings for short chain chlorinated paraffins (SCCP). | |
# These are alkanes with the molecular formula C_{x} H_{2x-y+2} Cl_{y} | |
# This implementation finds all unique ways to assign the `y` | |
# chlorines into `x` bin such that no bin has more than 2 chlorines, | |
# except the first and last may have 3 chlorines, then use those | |
# counts to create a SMILES string. | |
## Step 1: Assign chlorine counts for each carbon atom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find a set of 64-bit fingerprints with no ties in the NxN upper-triangular Tanimoto | |
# Andrew Dalke <[email protected]> | |
# 28 August 2021 | |
# Distributed under the terms of the MIT License | |
# https://opensource.org/licenses/MIT | |
# See also https://gist.github.com/ihaque/ee2f6de2091b5755219d8533b9bdfd15 | |
import random | |
from chemfp import bitops | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prototype implementation of a "toolbox" API for Open Force Field | |
# See https://github.com/openforcefield/openff-toolkit/issues/966 . | |
# Vocabulary: | |
# | |
# toolkit_wrapper = the existing OpenEyeToolkitWrapper, RDKitToolkitWrapper, etc. | |
# | |
# method name = something like "from_smiles" or "get_tagged_smarts_connectivity" | |
# | |
# method handler = a function which implement a named method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to compare the symmetry class assignments of RDKit's | |
# AssignStereochemistry and CanonicalRankAtoms. | |
# The input must come from a file named "x.dat", with one SMILES per | |
# line. | |
from rdkit import Chem | |
from collections import defaultdict | |
# Group atoms based on their symmetry group assignment values |