libAtoms / abcd

2 stars 4 forks source link

Use multiple properties in a single query expression #61

Closed gabor1 closed 4 years ago

gabor1 commented 5 years ago

I guess the </>/= are not allowed in the label names so the program could see that the other part is a number. Or is it possible to compare labels in the query? - It seems not to me:

$ abcd summary -q E_CC_MP2_2B -q "cutoff>E_CC_MP2_2B" 
Total number of configurations: 0
$ abcd summary -q E_CC_MP2_2B -q "cutoff<E_CC_MP2_2B" 
Total number of configurations: 0

Originally posted by @eszter137 in https://github.com/libAtoms/abcd/issues/60#issuecomment-512797969

fekad commented 5 years ago

From the implementation point of you this issue almost the same as #54 with some extra challenges. The question is very similar. What should be the meaning of the following expression:

abcd summary -q "cutoff=energy"

The last two is equivalent if they are scalars and have the same type. What would be the precedence for the different types?

gabor1 commented 5 years ago

This has low priority, as agreed.

I guess strings in the expressions should be first tried to be interpreted as keys, and if that fails, then they could be interpreted as strings. Enclosing something I quotes should force it to be a string.

-- Gábor

Gábor Csányi Professor of Molecular Modelling Engineering Laboratory Pembroke College University of Cambridge

Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/

On 18 Jul 2019, at 15:05, Adam Fekete notifications@github.com wrote:

From the implementation point of you this issue almost the same as #54 with some extra challenges. The question is very similar. What should be the meaning of the following expression:

abcd summary -q "cutoff=energy"

• atoms["cutoff"] is equal to energy sting? • atoms["energy"] is equal to cutoff sting? • atoms["cutoff"] is equal to atoms["energy"] value? • atoms["energy"] is equal to atoms["cutoff"] value? The last two is equivalent if they are scalars and have the same type. What would be the precedence for the different types?

• or both of them in a try block? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

gabor1 commented 4 years ago

Duplicate of #6