diff --git a/individu.py b/individu.py index 02c676cb171bfb49572264d1c6d4f55371c35ec2..380d40297e6d82986ca90d5a499f67c062807a61 100644 --- a/individu.py +++ b/individu.py @@ -1,5 +1,5 @@ -from table_rotation import table_rotation -from traj3D import * +from Initialisation import table_rotation +from Traj3D import * import numpy as np from math import sqrt @@ -16,18 +16,21 @@ class Individu(): first_nucleotide = traj_array[0, :] last_nucleotide = traj_array[-1, :] - distance = sqrt(sum((last_nucleotide - last_nucleotide) ** 2)) + distance = sqrt(sum((first_nucleotide - last_nucleotide) ** 2)) first_name = brin[0] last_name = brin[-1] - rot_computed = rot_table[last_name+first_name] + rot_computed = self.rot_table[last_name+first_name] rot_traj = first_name - last_name diff_angle = sum(abs(rot_computed - rot_traj)) self.score = 1/(distance + diff_angle) - def mutation(self): + # def mutation(self): - return mutation + # return mutation + +individu1 = Individu(table_rotation()) +print(individu1.rot_table.dict["AA"].x) \ No newline at end of file