Skip to content

Instantly share code, notes, and snippets.

def setBasicNitrogens(mol):
nitrogens = [i[0] for i in mol.GetSubstructMatches(Chem.MolFromSmarts('N'))]
for nidx in nitrogens:
atom = mol.GetAtomWithIdx(nidx)
if atom.GetIsAromatic():
continue
bonds = atom.GetBonds()
conj = any([b.GetIsConjugated() for b in bonds])
if conj:
continue
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.
<ForceField>
<AtomTypes>
<Type name="metha-C" class="O" element="C" mass="16.04"/>
</AtomTypes>
<Residues>
<Residue name="UME">
<Atom name="C" type="metha-C"/>
</Residue>
</Residues>
<NonbondedForce coulomb14scale="0.833333" lj14scale="0.5">
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.
prot_dons = np.array(pocket.GetSubstructMatches(HDonorSmarts)).flatten()
prot_accs = np.array(pocket.GetSubstructMatches(HAcceptorSmarts)).flatten()
lig_dons = np.array(ligand.GetSubstructMatches(HDonorSmarts)).flatten()
lig_accs = np.array(ligand.GetSubstructMatches(HAcceptorSmarts)).flatten()
def unit_vector(vector):
""" Returns the unit vector of the vector. """
return vector / np.linalg.norm(vector)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ljmartin
ljmartin / rankingGeometric.ipynb
Created November 8, 2022 22:51
modeling ability to rank with pymc3 using geometric distribution
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.