Esempio n. 1
0
 def set_metric(self,metric_type):
   metric_type = metric_type.upper()
   if   (metric_type[:4] == 'RMSD'): 
     self.metric = rmsd.rmsd()
   elif (metric_type[:4] == 'OGTO'):
     if len(metric_type) > 4 :
       sigma = float(metric_type[5:])
       self.metric = ogto.ogto(sigma)
     else :
       self.metric = ogto.ogto()
   elif (metric_type[:4] == 'SOAP'):
     self.metric = soap.soap()
   else:
     print "!!! unknown metric type:",metric_type,"!!!"
     sys.exit()
   print "> metric type:",self.metric.tag()
   sys.stdout.flush()
Esempio n. 2
0
"""
metric/s from Bartok's SOAP similarity measure
"""
import sys
import math
import os
import numpy as np
lib_path = os.path.abspath('..')
sys.path.append(lib_path)
import util
import soap
import rmsd
import ogto

###################################################################
d = soap.soap()
g = rmsd.rmsd()
o = ogto.ogto()
c1 = [[1.1, 1, 1], 
      [1, -1, -1], 
      [-1, 1, -1], 
      [-1, -1, 1]]
c1 = [[2.2, 2, 2], 
      [2, -2, -2], 
      [-2, 2, -2], 
      [-2, -2, 2]]
c2 = [[1.1, 1.1, 1.1], 
      [1.1, -1.1, -1.1], 
      [-1.1, 1.1, -1.1], 
      [-1.1, -1.1, 1.1]]
#-------------------------------
Esempio n. 3
0
"""
metric/s from Bartok's SOAP similarity measure
"""
import sys
import math
import os
import numpy as np
lib_path = os.path.abspath('..')
sys.path.append(lib_path)
import util
import soap
import rmsd
import ogto

###################################################################
d = soap.soap()
g = rmsd.rmsd()
o = ogto.ogto()
c1 = [[1.1, 1, 1], [1, -1, -1], [-1, 1, -1], [-1, -1, 1]]
c1 = [[2.2, 2, 2], [2, -2, -2], [-2, 2, -2], [-2, -2, 2]]
c2 = [[1.1, 1.1, 1.1], [1.1, -1.1, -1.1], [-1.1, 1.1, -1.1], [-1.1, -1.1, 1.1]]
#-------------------------------
c1 = [[1.23, 1.43, 1.43], [1.43, -1.43, -1.43], [-1.43, 1.41, -1.43],
      [-1.63, -1.43, 1.43]]
c2 = [[1.43, 1.43, 1.45], [1.45, -1.43, -1.43], [-1.43, 1.43, -1.43],
      [-1.43, -1.53, 1.43]]
#-------------------------------
c1 = [[1.1, 1, 1], [1, -1, -1], [-1, 1, -1], [-2, -2, 2]]
c2 = [[2.2, 2, 2], [2, -2, -2], [-2, 2, -2], [-4, -4, 4]]
#-------------------------------
eps = 1.e-4
Esempio n. 4
0
 def __init__(self):
     """@todo: to be defined1. """
     self.soap = soap()
Esempio n. 5
0
 def __init__(self):
     """@todo: to be defined1. """
     self.soap = soap()