[Cod-bugs] 'next' link does not save queried response_items

Oier Arcelus oarcelus at cicenergigune.com
Mon Nov 29 17:40:07 EET 2021


Hi,

I am trying to use the OPTIMADE API implementation of COD, through the pymatgen's OptimadeRester class. I just realized that the 'next' links that appear as responses do not conserve the queried response_fields.

For example, from this query:

https://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20ALL%20%22Co%22,%20%22Li%22,%20%22O%22)&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites

The 'next' link is:

https://www.crystallography.net/cod/optimade/v1.0.0/structures?page_limit=10&page_offset=10&filter=%28elements%20HAS%20ALL%20%22Co%22%2C%20%22Li%22%2C%20%22O%22%29

And then when the OptimadeRester class tries to find the some of the response_fields, it fails, as they are no longer present in the response from the COD.

Is this a bug? Or is it a known thing in the implementation, for me it makes it much harder to keep the information consistent across pagination.

Best regards,

Oier.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.crystallography.net/pipermail/cod-bugs/attachments/20211129/ce9e2ee3/attachment.htm>


More information about the Cod-bugs mailing list