Category:ZINC15:Shell

From DISI
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.