Category Filter logic [message #1123] |
Wed, 18 November 2020 21:01 |
chemtv
Messages: 26 Registered: February 2015 Location: Indianapolis
|
Junior Member |
|
|
From the behavior of using several category filters together it seems the combination of filters uses AND logic? Can this be switched to OR logic?
ie. I get the union of the exact match of filters rather than all the rows with at least one filter being met.
Thanks for the hard work keeping datawarrior running so well!
Greg
|
|
|
Re: Category Filter logic [message #1124 is a reply to message #1123] |
Wed, 18 November 2020 21:55 |
nbehrnd
Messages: 224 Registered: June 2019
|
Senior Member |
|
|
Hello Greg,
once the properties are stored in DW's main table, both Boolean .or. and .and. may be used for further analysis. In the example below, I extended the initial query for molecular weights greater than 110 (yielding mesitylene) to one that would accept molecules with a molecular weight of either less than 80 .or. greater than 110 by the instruction
if((TotalMolweight<80) || (TotalMolweight>110), "True", "False")
in an additional column (Data -> Add Calculated Values). As expected, the second query yields both benzene and mesitylene now.
It is possible to use multiple properties of different columns, too. DW's mathematics, including logic expressions, which may be used are presented on
http://www.openmolecules.org/help/jep.html
Norwid
[Updated on: Wed, 18 November 2020 21:58] Report message to a moderator
|
|
|
|
|
Re: Category Filter logic [message #1999 is a reply to message #1998] |
Mon, 04 September 2023 21:36 |
nbehrnd
Messages: 224 Registered: June 2019
|
Senior Member |
|
|
Dear Javier,
the program's internal documentation, chapter «working with data» briefly describes `chemsim(descriptor, idcode)` and `chemsim(descriptor1, descriptor2)` as if one could run build a new column of computed (Boolean) values line of `chemsim(PP3DMM2_of_Structure,"gFx@@eJf`@@@")` «check if column PP3DMM2_of_Structure contains the 3D motif of pyridine. I'm not aware if there either is a sketcher/converter to yield the DW's (2D) idcodes other than by access of a .dwar file with a text editor, or if/how e.g., a SMILES/SMARTS string could serve for a (sub) structure search. (Possibly, «descriptor» refers to the ones via Chemistry -> From Chemical Structure -> Calculate Descriptor.) Once identified, an extension to logical .and. and .or. would a next consequent step.
Norwid
[Updated on: Mon, 04 September 2023 21:37] Report message to a moderator
|
|
|
Re: Category Filter logic [message #2000 is a reply to message #1998] |
Thu, 07 September 2023 15:10 |
thomas
Messages: 715 Registered: June 2014
|
Senior Member |
|
|
Dear Javier and Norvid,
another way would be to merge your three structure columns into one new column and use a sub-structure-filter on the new column.
Norvid's suggestion reminds me to add a new chemsss() function, which would be more useful in this context than the chemsim() function.
Thomas
[Updated on: Thu, 07 September 2023 15:10] Report message to a moderator
|
|
|
Re: Category Filter logic [message #2001 is a reply to message #2000] |
Thu, 07 September 2023 22:31 |
nbehrnd
Messages: 224 Registered: June 2019
|
Senior Member |
|
|
Dear Thomas,
chemsim() attracted attention because of a recent find that openbabel's not only can retrieve molecules sharing a structural motif as a filter criterion, yet equally can highlight substructures, e.g. (discounting the backticks / accents graves) `obabel -:"c1ccncc1CCOC" -O example.png -s "c1ccncc1 blue"` in visual outputs.
Thank you,
Norwid
|
|
|