On Apr 27, 2009, at 12:25 PM, Beesley, Angela wrote:
> Hi,
>
> I am very new on cdk and on java in general so I am struggling a bit
> with the syntaxis and construction of commands. I managed to read
> a .sdf file and calculate smiles, now I am trying to calculate AlogP
> values, however all values return 0.0, I think that I have a problem
> with explicit hydrogens.
The descriptor will add explicit H's
> This is what i've done:
>
> IChemObjectBuilder builder =
> NoNotificationChemObjectBuilder.getInstance();
> IMolecule molecule = builder.newMolecule();
> molecule.addAtom(builder.newAtom("C"));
> molecule.addAtom(builder.newAtom("C"));
> molecule.addAtom(builder.newAtom("O"));
> molecule.addAtom(builder.newAtom("C"));
You don't seem to be adding any bonds between these atoms and hence
the atom typing will not be correct
> CDKAtomTypeMatcher matcher =
> CDKAtomTypeMatcher.getInstance(molecule.getBuilder());
> for (IAtom atom : molecule.atoms()) {
> IAtomType type = matcher.findMatchingAtomType(molecule, atom);
> AtomTypeManipulator.configure(atom, type);
> }
Consider using
AtomContainerManipulator.perceiveAtomTypesAndConfigureAtoms to do it
all at one go
> Also, on using the calculation of Individual Descriptors I have no
> problems (except the AlogP) but when using DescriptorEngine how can
> I get the numerical values of each descriptor?, so far I have used:
If you're not adding the bonds, I wonder about the validity of those
descriptor values
> DescriptorEngine engine = new
> DescriptorEngine(DescriptorEngine.MOLECULAR);
> engine.process(molecule);
> but from then I don't know how to get each descriptor separately
> with their corresponding names.
For a given decsriptor get its DescriptorSpecification object and then
use that as the key in the getProperty method of IAtomContainer. You
can get the list of available specification objects via
DescriptorEngine.getDescriptorSpecifications()
-------------------------------------------------------------------
Rajarshi Guha <[email protected]>
GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84
-------------------------------------------------------------------
Q: What's polite and works for the phone company?
A: A deferential operator.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user