示例#1
0
def compound_by_ChEMBLID(chembl_id):
    chembl_id, format = check_query(chembl_id)
    compound = chembldb.query(Molecule).filter_by(chembl_id=chembl_id).one()

    result = {
        "compound": {
            "acdLogd": float(compound.property.acd_logd),
            "acdLogp": float(compound.property.acd_logp),
            "alogp": float(compound.property.alogp),
            "chemblId": chembl_id,
            "knownDrug": is_known_drug(compound),
            "medChemFriendly": is_med_chem_friendly(compound),
            "molecularFormula": compound.structure.molformula,
            "molecularWeight": float(compound.property.full_mwt),
            "numRo5Violations": compound.property.num_ro5_violations,
            "passesRuleOfThree": is_ro3_pass(compound),
            "rotatableBonds": compound.property.rtb,
            "smiles": compound.structure.canonical_smiles,
            "stdInChiKey": compound.structure.standard_inchi_key
        }
    }
    return jsonify(result)
示例#2
0
文件: app.py 项目: kzfm/pychembldb
def compound_by_ChEMBLID(chembl_id):
    chembl_id, format = check_query(chembl_id)
    compound = chembldb.query(Molecule).filter_by(chembl_id=chembl_id).one()

    result = {
    "compound": {
        "acdLogd": float(compound.property.acd_logd),
        "acdLogp": float(compound.property.acd_logp),
        "alogp": float(compound.property.alogp),
        "chemblId": chembl_id,
        "knownDrug": is_known_drug(compound),
        "medChemFriendly": is_med_chem_friendly(compound),
        "molecularFormula": compound.structure.molformula,
        "molecularWeight": float(compound.property.full_mwt),
        "numRo5Violations": compound.property.num_ro5_violations,
        "passesRuleOfThree": is_ro3_pass(compound),
        "rotatableBonds": compound.property.rtb,
        "smiles": compound.structure.canonical_smiles,
        "stdInChiKey": compound.structure.standard_inchi_key
        }
    }
    return jsonify(result)
 def setUp(self):
     self.target = chembldb.query(CompoundProperty).first()
 def setUp(self):
     self.target = chembldb.query(ComponentSynonym).filter_by(component_id=7868).first()
示例#5
0
 def setUp(self):
     self.target = chembldb.query(MetabolismRefs).filter_by(
         met_id=120).first()
 def setUp(self):
     self.target = chembldb.query(MoleculeSynonym).filter_by(synonyms="Gleevec").first().molecule.property
 def setUp(self):
     self.target = chembldb.query(ProteinClassification).first()
 def setUp(self):
     self.target = chembldb.query(DrugMechanism).first()
示例#9
0
 def setUp(self):
     self.target = chembldb.query(Cell).get(1)
示例#10
0
 def setUp(self):
     self.target = chembldb.query(VariantSequence).filter_by(
         variant_id=109).first()
示例#11
0
 def setUp(self):
     self.target_type = chembldb.query(TargetType).first()
示例#12
0
 def setUp(self):
     self.target = chembldb.query(MoleculeSynonym).first()
示例#13
0
 def setUp(self):
     self.target = chembldb.query(Activity).get(31863)
示例#14
0
 def setUp(self):
     self.target = chembldb.query(ChemblId).first()
示例#15
0
 def setUp(self):
     self.target = chembldb.query(Target).get(1)
示例#16
0
 def setUp(self):
     self.target = chembldb.query(BindingSite).filter_by(
         site_name="Mu opioid receptor, 7tm_1 domain").first()
示例#17
0
 def setUp(self):
     self.target = chembldb.query(DefinedDailyDose).first()
 def setUp(self):
     self.target = chembldb.query(CompoundRecord).first()
示例#19
0
 def setUp(self):
     self.target = chembldb.query(Doc).get(10)
示例#20
0
 def setUp(self):
     self.target = chembldb.query(CompoundStructure).first()
 def setUp(self):
     self.target = chembldb.query(ActivityStdLookup).get(1)
示例#22
0
 def setUp(self):
     self.mol = chembldb.query(Molecule).first()
示例#23
0
 def setUp(self):
     self.target = chembldb.query(AssayParameter).filter_by(
         assay_param_id=3710885).first()
 def setUp(self):
     self.target = chembldb.query(BioComponentSequence).first()
 def setUp(self):
     self.target = chembldb.query(ActivityProperty).filter_by(ap_id=1).first()
示例#26
0
 def setUp(self):
     self.target = chembldb.query(FracClassification).filter_by(
         frac_class_id=470).first()
示例#27
0
 def setUp(self):
     self.target = chembldb.query(Formulation).filter_by(product_id="PRODUCT_017641_001").first()
示例#28
0
 def setUp(self):
     self.target = chembldb.query(PredictedBindingDomain).filter_by(
         site_id=1620).first()
示例#29
0
 def setUp(self):
     self.target = chembldb.query(Source).get(3)
示例#30
0
 def setUp(self):
     self.target = chembldb.query(Target).filter_by(
         chembl_id="CHEMBL2074").first()
 def setUp(self):
     self.target = chembldb.query(PredictedBindingDomain).get(1)
示例#32
0
 def setUp(self):
     self.target = chembldb.query(OrganismClass).first()
 def setUp(self):
     self.target = chembldb.query(ProteinFamilyClassification).filter_by(
         protein_class_id=1).first()
示例#34
0
 def setUp(self):
     self.target = chembldb.query(LigandEff).first()
示例#35
0
 def setUp(self):
     self.target = chembldb.query(Assay).get(10)
 def setUp(self):
     self.target = chembldb.query(RelationshipType).first()
示例#37
0
 def setUp(self):
     self.target = chembldb.query(ResearchStem).first()
示例#38
0
 def setUp(self):
     self.target = chembldb.query(Product).filter_by(trade_name="PAREDRINE").first()
 def setUp(self):
     self.target = chembldb.query(AssayClassification).filter_by(assay_class_id=1).first()
示例#40
0
 def setUp(self):
     self.target = chembldb.query(BindingSite).get(1)
示例#41
0
 def setUp(self):
     self.target = chembldb.query(HracClassification).filter_by(
         hrac_class_id=1).first()
 def setUp(self):
     self.target = chembldb.query(ComponentDomain).first()
 def setUp(self):
     self.target = chembldb.query(ConfidenceScore).first()
示例#44
0
 def setUp(self):
     self.mol = chembldb.query(Molecule).filter_by(chembl_id="CHEMBL941").first()
示例#45
0
 def setUp(self):
     self.target = chembldb.query(AssayType).first()
示例#46
0
 def setUp(self):
     self.target = chembldb.query(ActionType).first()
示例#47
0
 def setUp(self):
     self.target = chembldb.query(Version).first()
示例#48
0
 def setUp(self):
     self.target = chembldb.query(ActivitySupp).filter_by(as_id=1).first()
示例#49
0
 def setUp(self):
     self.target = chembldb.query(MechanismRefs).filter_by(
         mec_id=100).first()
 def setUp(self):
     self.target = chembldb.query(IndicationRefs).filter_by(
         drugind_id=22612).first()
示例#51
0
 def setUp(self):
     self.target = chembldb.query(StructuralAlertSet).filter_by(
         alert_set_id=1).first()
示例#52
0
 def setUp(self):
     self.target = chembldb.query(BioComponentSequence).first()
示例#53
0
 def setUp(self):
     self.target = chembldb.query(ResearchCompany).get(1)
 def setUp(self):
     self.target = chembldb.query(SiteComponent).get(1)
示例#55
0
 def setUp(self):
     self.target = chembldb.query(TissueDictionary).filter_by(uberon_id="UBERON:0000007").first()
 def setUp(self):
     self.target = chembldb.query(DefinedDailyDose).filter_by(
         atc_code="A01AA01").first()
示例#57
0
 def setUp(self):
     self.target = chembldb.query(LigandEff).first()