Combinatorial chemistry functions
Combichem
Combichem methods use stochastic rules-based molecular changes to generate new compounds. Combichem consists of the following steps:
- Library generation - create the next iteration of the library
- Library scoring - apply a numeric score to each item in the library
- Library pruning - remove low scoring compounds
Library generation consists of two main steps - mutation and crossover.
A mutation is a process that maps a single molecule to a new molecule. Custom mutations can be created by subclassing Mutator
Crossover is a process where a pair of molelcules is used to generate a new molecule that contains features of each parent molecule. Custom crossovers can be created by subclassing Crossover
df = pd.read_csv('files/smiles.csv')
mols = to_mols(df.smiles.values[:10])
cx = FragmentCrossover()
out = cx(mols)
m = EnumerateHeterocycleMutator()
len(m(df.smiles.values[1]))
m = SelfiesInsert(20)
mol = to_mol('c1ccccc1')
len(m(mol))
m = SelfiesReplace(20)
mol = to_mol('c1ccccc1')
len(m(mol))