Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calculate_scores(population):
- scores = []
- for gene in population:
- mol=prepare_molecule(gene)
- Chem.SDWriter('mol_%i.sdf'%(population.index(gene))).write(mol) #add hs, optimize mol, remove hs, write all to sdf file
- shell('obabel mol_%i.sdf -O ligand_%i.pdbqt'%(population.index(gene),population.index(gene)),shell=False)
- score = sc.smina_score('ligand_%i.pdbqt'%(population.index(gene)))
- print(score)
- scores.append(max(float(score),0.0))
- return scores
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement