SMARTS excluding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SMARTS excluding

JdeBruin
Hi,

I am searching for a number of active groups in molecules using smarts and it so happens that some of the groups overlap. Thus would it be possible to write a smart stating to find a group but it should not be part of another group.

smartA = "Some Smart"
SmartB ='SecondSmart not part of SmartA'

Thanks

--
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|

Re: SMARTS excluding

Pascal Muller-3
Hi,

> I am searching for a number of active groups in molecules using smarts and
> it so happens that some of the groups overlap. Thus would it be possible to
> write a smart stating to find a group but it should not be part of another
> group.
> smartA = "Some Smart"
> SmartB ='SecondSmart not part of SmartA'

smartA = C(F)(F)F)

smartB = A[#6;!$(C(F)(F)F)]
(Aliphatic atom single-bonded to any carbon which isn't a trifluromethyl carbon)

http://www.daylight.com/dayhtml_tutorials/languages/smarts/#LOGIC
"!" means "not" - but I guess you already knew that... Doesn't it
match your needs?

Regards,
Pascal

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|

Re: SMARTS excluding

JdeBruin
Hi have tried the following:

alcohol = pybel.Smarts('[OX2H]')
ketone = pybel.Smarts('[#6][CX3](=O)[#6]')
carboxylic_acid =  pybel.Smarts('[CX3](=O)[OX2H1]')

Which finds an alcohol a ketone and a carboxylic acid and it should only find a carboxylic acid. 

If I try the following:
which should not find a alcohol or ketone if they are part of a carboxylic acid
alcohol = pybel.Smarts('[OX2H];!$[CX3](=O)[OX2H1]')
ketone = pybel.Smarts('[#6][CX3](=O)[#6];!$[CX3](=O)[OX2H1]')


I get "Invalid Smart" which is probably my fault.


Thanks


On 24 August 2011 10:34, Pascal Muller <[hidden email]> wrote:
Hi,

> I am searching for a number of active groups in molecules using smarts and
> it so happens that some of the groups overlap. Thus would it be possible to
> write a smart stating to find a group but it should not be part of another
> group.
> smartA = "Some Smart"
> SmartB ='SecondSmart not part of SmartA'

smartA = C(F)(F)F)

smartB = A[#6;!$(C(F)(F)F)]
(Aliphatic atom single-bonded to any carbon which isn't a trifluromethyl carbon)

http://www.daylight.com/dayhtml_tutorials/languages/smarts/#LOGIC
"!" means "not" - but I guess you already knew that... Doesn't it
match your needs?

Regards,
Pascal



--
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|

Re: SMARTS excluding

Pascal Muller-3
Hi,

> Hi have tried the following:
> alcohol = pybel.Smarts('[OX2H]')
> ketone = pybel.Smarts('[#6][CX3](=O)[#6]')
> carboxylic_acid =  pybel.Smarts('[CX3](=O)[OX2H1]')
> Which finds an alcohol a ketone and a carboxylic acid and it should only
> find a carboxylic acid.

Indeed, [CX3](=O)[OX2H1] is correct and find only carboxylic acid.


> If I try the following:
> which should not find a alcohol or ketone if they are part of a carboxylic
> acid
> alcohol = pybel.Smarts('[OX2H];!$[CX3](=O)[OX2H1]')

I think that the first atom after the $ sign should be the atom you
consider --> O and not C in your exemple.

So:
[OX2H1;!$(OC=O)]
[OX2H1;!$([OX2H1]C=O)]

But what about avoiding "!" for more easy to read expression:
alcool = pybel.Smarts("[OX2H][CX4,c]")
alcoolCH = pybel.Smarts("[OX2H][CX4][H]")

Regards,
Pascal

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting