Skip to content

Commit

Permalink
efficiency patch for the sa score code from Nick Firth
Browse files Browse the repository at this point in the history
  • Loading branch information
greglandrum committed Oct 5, 2013
1 parent 3c631ae commit 4081cb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Binary file modified Contrib/SA_Score/fpscores.pkl.gz
Binary file not shown.
12 changes: 8 additions & 4 deletions Contrib/SA_Score/sascorer.py
Expand Up @@ -23,11 +23,15 @@
from collections import defaultdict

_fscores = None

def readFragmentScores(name='fpscores'):
import cPickle,gzip
global _fscores
_fscores = cPickle.load(gzip.open('%s.pkl.gz'%name))
import cPickle,gzip
global _fscores
_fscores = cPickle.load(gzip.open('%s.pkl.gz'%name))
outDict = {}
for i in _fscores:
for j in range(1,len(i)):
outDict[i[j]] = float(i[0])
_fscores = outDict

def numBridgeheadsAndSpiro(mol,ri=None):
if ri is None:
Expand Down

0 comments on commit 4081cb5

Please sign in to comment.