Chemical term to count the no. of sp3 carbons in a molecule?

User fca09bdbff

02-11-2009 10:37:08

I would like to count the number of sp3 hybridized carbons in a molcule. Is there an easy way to do this, e.g. as a Chemical Term?

ChemAxon e08c317633

02-11-2009 11:09:40

CT expression for counting carbon atoms with 4 connected ligands:


$ evaluate -e "count(filter('atno()==6 && connections()==4'))" "C\C=C\C(C)C"
4


We have no functions for filtering spn hybridization states yet.


I hope this helps.


Zsolt


 


 

User fca09bdbff

02-11-2009 12:20:25

Hello,


Thanks for the prompt reply.


count(filter('atno()==6 && connections()==4')) worked fine in IJC.

User fca09bdbff

13-11-2009 10:36:03

Hello,


I would like to count the number of aromatic carbon atoms in a set of molecules.


"count(filter('atno()==6 && connections()==3'))" will give me all the sp2-hybridised carbons but this includes carbonyls etc.


Is there a way to exclude these?

ChemAxon e08c317633

13-11-2009 14:25:38

Yes, there is.


Example:


$ evaluate -e "count(filter('atno()==6 && connections()==3')) - matchCount(carbonyl)" "CCC(=O)C\C=C\C"
2


The number of carbonyl groups is subtracted from the number of sp2 carbons.


Same for aromatic carbons:


$ evaluate -e "count(filter('atno()==6 && connections()==3 && aromaticAtom()')) - matchCount('[c;X3:1]=[O;X1:2]')" "CC(=O)C\C=C\C1=CC=CC=C1"
6


For more functional groups and predefined molecule sets see: http://www.chemaxon.com/jchem/marvin/help/chemicalterms/ChemicalTerms.html#molsets


Zsolt

User fca09bdbff

24-02-2010 10:18:28

Hello,


Is it possible to evaluate two CT expressions in one line, e.g. combine


-e "count(filter('atno()==6 && connections()==4'))" with


-e "count(filter('atno()==6'))"


so the output would be the number of sp3 carbons and the number of all carbons.


Regards,


Tim Ritchie.

ChemAxon e08c317633

24-02-2010 10:51:55

Yes, it is possible. Separate the expressions with semicolon.


Example:


evaluate -e "count(filter('atno()==6 && connections()==4')); count(filter('atno()==6'))" "CCCC=C"
3;5 


Zsolt

User fca09bdbff

24-02-2010 16:34:24

Great. Many thanks.


Tim Ritchie.

User fca09bdbff

11-06-2012 15:23:00

Hello,


Is there a way to count the number of sp3 carbon atoms in a SMILES string using cxcalc rather than IJC/evaluate?


Thanks, Tim Ritchie.

ChemAxon e08c317633

12-06-2012 07:58:16

No, cxcalc cannot be used for that.


Zsolt

User fca09bdbff

12-06-2012 08:45:39

OK. Thanks.


Is it possible to do something as a function in JChem Excel?


Regards, Tim Ritchie.

ChemAxon e08c317633

12-06-2012 09:40:42

Yes, Chemical Terms is available in Excel.


Zsolt

User fca09bdbff

12-06-2012 10:49:45

Thanks. Could you give me the syntax to generate a function in Excel to calculate the number of sp3 carbons please? Thanks, Tim Ritchie.

ChemAxon d76e6e95eb

12-06-2012 12:26:19

Try this:


matchCount("[CX4]")

User fca09bdbff

13-06-2012 07:55:38

Hello,


When I insert a JChemExcel.Function, I have to select from a predefined list, e.g. JCAliphaticAtomCount, JCCarboAromaticRingCount etc.


Is it possible to add additional custom functions such as counting sp3 carbons etc?


Thanks and regards,


Tim Ritchie.

User fca09bdbff

13-06-2012 15:25:17

Hello,


I found that the following worked as a Chemical Term in JChem/Excel.


Regards,


Tim Ritchie.


=JCChemicalTerms(A1,"count(filter('atno()==6 && connections()==4'))")