"...riseclipse-metamodel-nsd2016.git" did not exist on "0b2c2e04992231ac52d8aa08c96682e8a01e597d"
Newer
Older
import numpy as np
from math import sqrt
class Individu():
self.score = None
def evaluate(self, brin):
traj = Traj3D()
first_nucleotide = traj_array[0, 0:3]
last_nucleotide = traj_array[-1, 0:3]
distance = sqrt(sum((first_nucleotide - last_nucleotide) ** 2))
rot_computed = self.table.Rot_Table[last_name+first_name]
rot_traj = first_nucleotide - last_nucleotide
print(rot_traj)
print(rot_computed)
diff_angle = sum(abs(rot_computed - rot_traj))
self.score = 1/(distance + diff_angle)
def mutation(self):
table = RotTable()
test = Individu(table)
test.evaluate("AAAGGATCTTCTTGAGATCCTTTTTTTCTGCGCGTAATCTGCTGCCAGTAAACGAAAAAACCGCCTGGGGAGGCGGTTTAGTCGAA")
print(test.score)