Calculating no. of atoms in molecular framework &side chains

User fca09bdbff

10-07-2012 06:46:01

Hello,


I would like to count the number of heavy atoms in the molecular framework of a structure (i.e. the ring systems that remain after side chains are removed), and also count the number of atoms in the side chains.


Is this possible as a Chemical Term?


Regards,


Tim Ritchie (GSK Stevenage UK).

ChemAxon afdac7b783

10-07-2012 09:26:05

 Hi,

You can get the heavy atom count of the molecule by subtracting the Hydrogen atom count from the atom count:



$ evaluate -e "atomCount() - atomCount('1')" "C1CCCCC1CCCCCCCC"
14


The number of heavy atoms in the molecular framework of a structure is returned if you use the following command:


$ evaluate -e "atomCount(bmf(mol())) - atomCount(bmf(mol()),'1')" "C1CCCCC1CCCCCCCC"

6


Find more information on structural framework options: https://www.chemaxon.com/marvin/help/chemicalterms/EvaluatorFunctions.html#structuralframeworks_functions



Calculating the number of heavy atoms of the sidechain, you need to substract the above two functions, i.e., the number of heavy atoms of the whole molecule - the number of heavy atoms of the molecular framework



$ evaluate -e "(atomCount() - atomCount('1')) - (atomCount(bmf(mol())) - atomCount(bmf(mol()),'1'))" "C1CCCCC1CCCCCCCC"

8


 


Best Regards,


Viktoria

User fca09bdbff

10-07-2012 09:49:58

Thanks for that.


Is it possible to do something similar using Chemical Terms within JChem/Excel?

ChemAxon afdac7b783

10-07-2012 10:11:13

Yes, you can use the "JCChemicalTerms" function to apply Chemical Terms functions in JChem for Excel.


Find more help and examples at: http://www.chemaxon.com/jchem4excel/userguide/chemical_terms.html


Regards,


Viktoria

User fca09bdbff

10-07-2012 10:44:36

Could you please give me an example of a CT that would work in Excel, equivalent to


evaluate -e "atomCount(bmf(mol())) - atomCount(bmf(mol()),'1')"


Thanks, Tim Ritchie.

ChemAxon afdac7b783

10-07-2012 12:25:17

Hi,


 


The following function returns the heavy atom count of the molecule in the A1 cell:


=JCChemicalTerms(A1;"(atomCount() - atomCount('1')")

while this example returns the heavy atom count of the molecular farmework of the molecule in the A1 cell:


=JCChemicalTerms(A1;"(atomCount(bmf())) - atomCount(bmf(),'1')")


BR,


Viktoria

User fca09bdbff

10-07-2012 15:19:50

Many thanks.


In Excel, I needed to change the semicolon for a comma for it to work, but this was exactly what I wanted.


Regards, Tim Ritchie.