openmolecules.org

 
Home » DataWarrior » Functionality » Search for "any atom" in structure editor
Search for "any atom" in structure editor [message #1666] Mon, 11 July 2022 10:41 Go to next message
TomSilico is currently offline  TomSilico
Messages: 1
Registered: July 2022
Junior Member
Hi DW,

I've looked through the documentation for this feature and thought it wasn't possible, until I saw a screenshot in another forum post. The title of this post is "How to perform general R group searches in DW". (I can't link it here as this is my first post on this forum).

I'd like to make one atom match "any atom" or e.g. "either carbon or nitrogen" or "not a carbon" in the structure editor. I'd use this both when I apply a structure filter, or when I define the core of a molecule to re-draw molecules of a series so they're oriented the same way (Chemistry > Generate 2D atom coordinates).

It seems like it's possible from the post above when Norwid defines an atom in the structure editor as [C,N] to match both atoms. How can I do this? I've tried using the "?..." button and typing in [C,N] as the atom label. But this seems to only allow specific labels (R, Ala etc...Wink.

In that same post above, it was suggested to replace the two .jar files available for download in the .zip file for improved functionality. I've done this on my machine (Windows, DW5.5.0).

Cheers,

Thomas
Re: Search for "any atom" in structure editor [message #1671 is a reply to message #1666] Wed, 13 July 2022 22:30 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
The key is to use the lasso tool. If you edit a substructure (as opposed to a molecule, which does not support query features), then you can select the lasso tool and double click an atom (or one of multiple selected atoms) to open the atom query feature dialog. Here you define your example cases as follows:
- "any atom": first checkbox in the dialog is 'Any atomic number'
- "either carbon or nitrogen": type 'N,C' in the 'Allowed Atoms' field
- "not a carbon": select 'Any atomic number' and type 'C' in 'Excluded Atoms' field

This works in all places that allow you to edit substructures, e.g. reaction in combinatorial enumeration, 2D-coordinate generation, etc.
Re: Search for "any atom" in structure editor [message #1883 is a reply to message #1671] Fri, 28 April 2023 21:37 Go to previous messageGo to next message
rkp@23 is currently offline  rkp@23
Messages: 3
Registered: April 2023
Junior Member
I am new to Datawarrior and I have a similar question.

I am trying to understand the difference between a molecule and a query.
I am trying to search ChemBL database using the feature "similar structures to"
While doing that , I tried to draw using the structure editor, a query molecule, with any R group attached to a halide.

In the first try, it allows me to change the atom properties. But if I want to further do any changes, selecting lasso tool and double clicking it, select the entire molecule and not a particular atom.

I am trying to understand how to define a molecule as a molecule with a query feature as opposed to just a molecule.

is there a way to define a structure as a query in DataWarrior?
I could not find a clear explanation of this in the documentation, except that in the Lasso tool section, its written that if not a query, the entire molecule will be selected and no "Atom Properties" dialog will open.

Please help!
Re: Search for "any atom" in structure editor [message #1884 is a reply to message #1883] Sat, 29 April 2023 13:50 Go to previous message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
DataWarrior distinguishes molecules from substructure queries:

Molecules are considered atom-complete except for plain hydrogen atoms, which typically are not drawn. Any open valences of a molecule are implicitly considered to be filled by hydrogen atoms. Molecule atoms or bonds cannot carry query features. The structure editor, when editing queries for similar or exact molecule search, is in 'molecule mode'. Therefore, you cannot add query features and implicit hydrogens are shown on hetero atoms.

Substructure queries are atom-incomplete, which means that open atom valences are NOT considered to be filled by hydrogen atoms. They allow query features on atoms and bonds that narrow or broaden the meaning of the drawn atom/bond, e.g. require it to be in an aromatic ring, or allow an atom to be either N,O,S or a bond to be either single or double. In addition, one can define attachment groups, which are not allowed at a particular position ('exclude groups').

Details are explained in the "Help->Chemical Structures->The Structure Filter"; scoll down to 'Substructure Search'...

[Updated on: Sat, 29 April 2023 13:50]

Report message to a moderator

Previous Topic: Opening .CSV file
Next Topic: showing variable txt/values at "showMessage" macros
Goto Forum:
  


Current Time: Sun Nov 24 00:12:53 CET 2024

Total time taken to generate the page: 0.03761 seconds