You need to add the bonds somehow. If there is no way to infer the bonds
from the atomic coordinates, then it is impossible.
Regards,
- Noel
On 24 October 2017 at 22:05, <peng...@yandex.com> wrote:
> Hi Noel,
>
> I think you are right! I use `SetAtomicNum()`, `SetVector()` to build an
> OBMol
> atom by atom, and then call `ConnectTheDots()` to add bonds. Apparently
> due to
> valency, oxygen atoms won't have more than two bonds, hydrogen not more
> than
> one. Therefore the molecule won't ever match H3O+ or H5O2+.
>
> How should I then approach this SMARTS matching problem? My system has
> regular
> water molecules and I have only coordinates and atomic numbers, so a
> priori I
> don't know which oxygen atoms belong to H3O+ and which hydrogen atoms are
> bridging hydrogen in H5O2+. I'd really appreciate your suggestions. Thanks!
>
> Best regards,
>
> Peng
>
>
> On 10/24/2017 3:19 PM, Noel O'Boyle wrote:
>
>> If you write out your molecules as SMILES strings, what do they look
>> like? It's possible you are missing some bonds.
>>
>> On 24 October 2017 at 17:41, <peng...@yandex.com <mailto:
>> peng...@yandex.com>> wrote:
>>
>> Hi,
>>
>> I'm wondering how I can match hydronium ions (H3O+) and H5O2+ using
>> SMARTS with
>> OpenBabel. I created the OBMol object with only atomic number and
>> coordinates
>> information, and I tried using "[#8](~[#1])(~[#1])~[#1]",
>> "[#8+](~[#1])(~[#1])~[#1]", and "[OH3+]" but none of them produced
>> any matches.
>> If I set atomic number for oxygen atoms to 6 (pretending they are
>> carbon) when
>> creating OBMol, and use "[#6](~[#1])(~[#1])~[#1]", then it does match
>> successfully. Is there anything I'm doing wrong here?
>>
>> Thanks very much!
>>
>> Peng
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net <mailto:
>> OpenBabel-discuss@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss <
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
>>
>>
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss