Oxygen and nitrogen counts.

User fca09bdbff

09-06-2010 07:54:56

Hello,


I would like to count the number of aromatic and aliphatic nitrogens and oxygens in a set of smiles.


Could you suggest the syntax to do this with evaluate please?


Thanks,


Tim Ritchie.

ChemAxon e08c317633

09-06-2010 11:04:25

Hi,


Count


- aliphatic nitrogens:


$ evaluate -e "matchCount('N')" "NCc1c[nH]cn1"
1

- aromatic nitrogens:


$ evaluate -e "matchCount('n')" "NCc1c[nH]cn1"
2

- all nitrogens:


$ evaluate -e "matchCount('[#7]')" "NCc1c[nH]cn1"
3

Count oxigens: similarly, use 'O', 'o', and '[#8]'.


Zsolt

User fca09bdbff

09-06-2010 14:52:21

Hello,


I tried 


evaluate -e "matchCount('N')" "NCc1c[nH]cn1"


 but I just get syntax errors ("implicit multiplication not enabled").


Any thoughts?


Regards,


Tim Ritchie.

ChemAxon e08c317633

09-06-2010 15:06:04

To use matchCount() Chemical Terms function JChem has to be installed (MarvinBeans package does not contain MolSearch). Do you have JChem installed?


Zsolt


 

User fca09bdbff

09-06-2010 18:43:44

No, I don't think I have JChem, only Marvin Beans.


I managed to get the desired result by using the count function, filtering on the atomic number, and whether the atoms were aromatic or aliphatic.


Regards,


Tim.