File: shaperecognition.py

package info (click to toggle)
mgltools-pyautodock 1.5.7-3
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, buster, sid
  • size: 45,148 kB
  • sloc: python: 4,540; sh: 78; makefile: 13
file content (44 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (4)
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
36
37
38
39
40
41
42
43
44
############################################################################
#
# Authors: William Lindstrom, Ruth Huey
#
# Copyright: A. Olson TSRI 2007
#
#############################################################################

#
# $Id: shaperecognition.py,v 1.1 2007/04/13 20:17:35 rhuey Exp $
#

import math
from scorer import ScoringStrategy
from mglutil.math import usr


class ShapeRecognitionRefImpl(ScoringStrategy):
    """reference implementation of the 

"""
    def __init__(self, ms=None):
        ScoringStrategy.__init__(self)
        if ms is not None:
            self.set_molecular_system(ms)


    def set_molecular_system(self, ms):
        self.ms = ms


    def get_score(self):
        """
        """
        usr0 = usr.usr_descriptors( self.ms.get_coords(0))
        usr1 = usr.usr_descriptors( self.ms.get_coords(1))
        return usr.usr_similarity( usr0, usr1)

ShapeRecognition = ShapeRecognitionRefImpl
# ShapeRecognitionRefImpl

if __name__ == '__main__':
    pass
    # test_scorer.run_test()