Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def ShortGI(dist, charge1,charge2,): | |
#These are precomputed coefficients: | |
a=np.array([[ 15.90600036, 3.9534831 , 17.61453176], | |
[ 3.9534831 , 5.21580206, 1.91045387], | |
[ 17.61453176, 1.91045387, 238.75820253]]) | |
b=np.array([[-0.02495 , -0.04539319, -0.00247124], | |
[-0.04539319, -0.2513 , -0.00258662], | |
[-0.00247124, -0.00258662, -0.0013 ]]) | |
a_flat = a.flatten() |
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
from rdkit.Chem.Draw import rdMolDraw2D | |
from IPython.display import SVG | |
from rdkit import Chem | |
from rdkit.Chem import Draw | |
mol = Chem.MolFromSmiles(Chem.MolToSmiles(l)) | |
beez = mol_to_bits(mol) | |
def mol_to_bits(mol): | |
"""Convert the atoms in a molecule into bit IDs. | |
This uses the morgan fingerprint with a depth of zero - |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import keras | |
import tensorflow as tf | |
class D2M(keras.layers.Layer): | |
""" | |
Converts an EDM `D` to its Gram matrix representation `M`. | |
""" | |
def call(self, inputs, **kwargs): | |
batch_size = tf.shape(inputs)[0] | |
n_atoms = tf.shape(inputs)[1] |
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
from rdkit import Chem | |
import numpy as np | |
from rdkit.Chem import AllChem | |
from rdkit.Geometry import Point3D | |
from scipy.spatial.distance import squareform, pdist | |
import copy | |
import py3Dmol |