File size: 497 Bytes
1d7245f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from rcsbsearch import Terminal
from rcsbsearch import rcsb_attributes as attrs

# Create terminals for each query
q1 = attrs.rcsb_entry_info.nonpolymer_entity_count > 0
q2 = attrs.rcsb_entry_info.polymer_entity_count_protein > 0
q3 = Terminal('chem_comp.formula_weight','greater_or_equal',150,service='text_chem')

# combined using bitwise operators (&, |, ~, etc)
query = q1 & q2 & q3  # AND of all queries

# Call the query to execute it
for assemblyid in query("entry"):
    print(assemblyid)