Skip to content
Snippets Groups Projects
Commit 0880187d authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add computing of LE and LLE in Compound

Former-commit-id: b1a17d4f65dc933c11891cee60d91e12334e41be
parent a663f6d5
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ from __future__ import unicode_literals
from django.db import models
from django_pandas.managers import DataFrameManager
from django.db.models import Max
from .ws import get_pubmed_info, get_epo_info, get_uniprot_info, get_taxonomy_info, get_go_info, get_pfam_info
......@@ -407,6 +408,20 @@ class Compound(models.Model):
def pfizer_global(self):
return self.pfizer_a_log_p and self.pfizer_tpsa
@property
def le(self):
"""
LE: Ligand Efficiency
"""
return (1.37 * float(self.compoundactivityresult_set.aggregate(Max('activity'))['activity__max']))/self.nb_atom_non_h
@property
def lle(self):
"""
LLE: Lipophilic Efficiency
"""
return float(self.compoundactivityresult_set.aggregate(Max('activity'))['activity__max'] - self.a_log_p)
class MDDRActivityClass(models.Model):
name = models.CharField('Activity Class', max_length=100, unique=True)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment