The SMILES parser nor other IO (maybe CML) will assign atom types for you -
you need to do this yourself with:

AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(methane);

Atom types are an annotation on top of a molecule. There are different atom
types we could assign - CDK atom types are just on set, ALOGP is a
different set (for example). In pre CDK 1.4 basically everything was built
on top of the view that CDK atom types were present - this is no longer the
case.

On Sun, 20 Sep 2020 at 22:44, Rajarshi Guha <rajarshi.g...@gmail.com> wrote:

> Hi, the following code is failing because the parsed molecule has no atom
> type names. The calculate() method tries to identify atom types from the
> atoms type name, but this seems circular. Unless I assign atom types, where
> does the type name come from?
>
> public class CDKVolumeTest {
>     public static void main(String[] args) throws CDKException {
>         SmilesParser sp = new 
> SmilesParser(DefaultChemObjectBuilder.getInstance());
>         IAtomContainer mol = sp.parseSmiles("CCO");
>
>         double vol = VABCVolume.calculate(mol);
>     }
> }
>
>
> --
> Rajarshi Guha | http://blog.rguha.net | @rguha <https://twitter.com/rguha>
>
> _______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to