Skip to content
Snippets Groups Projects
Commit 140c4d57 authored by Santos Garcia Carlos's avatar Santos Garcia Carlos
Browse files

Commentaires

parent 3b29da84
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ from random import random ...@@ -7,7 +7,7 @@ from random import random
P1 = 0.015 P1 = 0.015
class Individu(): class Individu():
''' Un individu est caractérisé par sa table de rotations (individu.table)'''
def __init__(self, table): def __init__(self, table):
lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")] lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")]
brin = ''.join(lineList[1:]) brin = ''.join(lineList[1:])
...@@ -18,6 +18,7 @@ class Individu(): ...@@ -18,6 +18,7 @@ class Individu():
self.score = self.evaluate() self.score = self.evaluate()
def evaluate(self): def evaluate(self):
''' Evalue le score d'un individu sur un nombre numb_ajout de points'''
traj = Traj3D() traj = Traj3D()
numb_ajout = 6 numb_ajout = 6
...@@ -47,6 +48,7 @@ class Individu(): ...@@ -47,6 +48,7 @@ class Individu():
def mutation(self, proba = P1): def mutation(self, proba = P1):
'''Modifie des rotations dans la table des rotations en préservant les symétries'''
table_rotations = self.table.rot_table table_rotations = self.table.rot_table
for doublet in table_rotations : for doublet in table_rotations :
for coord in range(3): for coord in range(3):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment