Hi! I've been struggling with this problem for a while now. I am trying to make a python script that parses through my list of pdb codes and reference ligands, and then connects to the rcsb api to get information on: whether the reference ligand is present, whether it is bound, and if so, which chain it is bound to?
I tried the query construction and grouping but the 'which chain it is bound to' query just didn't work for some reason (even without grouping). My query is below:
ligand_bound_query = AttributeQuery( attribute="rcsb_ligand_neighbors.ligand_is_bound", operator="exact_match", value="Y" )
so I resorted to trying to get json files about the protein/entity and then getting a ligand_asym_id (i.e which chain the ligand is bound to). I'm trying to hit this api url:
url = f"https://data.rcsb.org/rest/v1/core/{entity_type}/{pdb_id}"
but I feel that this is wrong (it doesn't work either). Which URL or api end-point will help me get the information on which chain my ligand is bound to (without me already knowing the ligand's asym id)? Please help!