This file is indexed.

/usr/share/RDKit/Contrib/SA_Score/UnitTestSAScore.py is in rdkit-data 201603.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from __future__ import print_function
from rdkit import RDConfig
from rdkit import Chem
import unittest,os.path
import sascorer
print(sascorer.__file__)

class TestCase(unittest.TestCase):
  def test1(self):
    with open('data/zim.100.txt') as f:
      testData = [x.strip().split('\t') for x in f]
    testData.pop(0)
    for row in testData:
      smi = row[0]
      m = Chem.MolFromSmiles(smi)
      tgt = float(row[2])
      val = sascorer.calculateScore(m)
      self.assertAlmostEqual(tgt,val,3)

if __name__ == '__main__':
  import sys,getopt,re
  doLong=0
  if len(sys.argv) >1:
    args,extras=getopt.getopt(sys.argv[1:],'l')
    for arg,val in args:
      if arg=='-l':
        doLong=1
      sys.argv.remove('-l')
  if doLong:
    for methName in dir(TestCase):
      if re.match('_test',methName):
        newName = re.sub('_test','test',methName)
        exec('TestCase.%s = TestCase.%s'%(newName,methName))
        
  unittest.main()