Category:ZINC15:Shell

From DISI
Jump to: navigation, search

ZINC Shell Idioms

Starting the ZINC shell (from an environment with ZINC15 installed)

   >>> python -m zinc.management shell

Examples

Querying for substances

   >>> subs = Substance.query.filter(Substance.mwt < 500).all()

==== Querying for eukaryotic genes with strong activity observations (notes)

   >>> genes = Gene.query.filter(Genes.organism.has(Organism.code == 'E'), Genes.notes.any(ActivityObservation.affinity > 6))

==== Quering for eukaryotic Genes with strong activities and also no purchasable compounds

   >>> genes = Gene.query.filter(Genes.organism.has(Organism.code == 'E'), \
                                 Genes.notes.any(ActivityObservation.affinity > 6), \
                                 ~Genes.notes.any(ActivityObservation.substance.has(Substance.purchasable >= 10)))

This category currently contains no pages or media.