Or you can use AllChem.CalcMolFormula() to get the chemical formula.
Ling
On Wed, Oct 7, 2015 at 3:55 AM, Andrew Dalke
wrote:
> On Oct 7, 2015, at 11:30 AM, Christos Kannas wrote:
> > Yes there is an easier way, by using substructure search, i.e. do a
> substructure
On Oct 7, 2015, at 11:38 PM, Ling Chan wrote:
> Or you can use AllChem.CalcMolFormula() to get the chemical formula.
Well spotted! It's a bit tricky because it needs to handle carbons with/without
count ("CH4", "C2H6"), and structures with no carbons ("P", "Ca", "Cd"); the
last two start with a
Hi all,
is there an easy way I'm missing to get the number of C-Atoms in a molecule?
Currently I iterate all atoms and check if it's symbol is C. Doesn't seem
very efficient.
Best Regards,
Joos Kiener
--
Full-scale,
Hi Joss,
Yes there is an easier way, by using substructure search, i.e. do a
substructure search for [C] and then get the number of matches.
Hope this example to be readable and answer your question.
In [1]:
from rdkit import rdBase
print rdBase.rdkitVersion
from rdkit import Chem
from
On Oct 7, 2015, at 11:30 AM, Christos Kannas wrote:
> Yes there is an easier way, by using substructure search, i.e. do a
> substructure search for [C] and then get the number of matches.
> m = Chem.MolFromSmiles("c1c1")
> patt= Chem.MolFromSmarts("[C]")
> pm =
5 matches
Mail list logo