Hi Both,

Mass/isotope has never been set by atom typing or the AtomContainerManipulator 
convince method you need to use Istopes (or XMLIsotopedFactory). These were 
IsotopedFactory in CDK 1.4. You might have have found this already.

> Istopes.getInstance().configureAtoms(container);


In fact you really shouldn’t call the above at all. Since it’s a look-up the 
methods requiring mass (e.g. qsars) should check for null and look up the value 
them selves.

J

> On 24 Oct 2014, at 16:22, Rajarshi Guha <[email protected]> wrote:
> 
> So the problem is in the exact mass - it is always null. I took a look at the 
> unit test for the descriptor and I see 
> 
>         IAtomContainer ac = (IAtomContainer) cList.get(0);
>         AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(ac);
> 
> After this code, the exact mass should be non-null, but in fact every atom in 
> the molecule has a null value for exact mass. This leads to the center of 
> mass being null and there for the final descriptor value is NaN
> 
> It looks like this is happening for all the LoB unit tests.
> 
> So the question is - why is exact mass null after atom typing? Or is there a 
> new way to configure the exact mass?
> 
> 
> On Thu, Oct 23, 2014 at 6:03 PM, Zheng Shi <[email protected] 
> <mailto:[email protected]>> wrote:
> Here is an example of one molecule. The Z coordinate is not 0. But the result 
> is still NaN.
> 
> On Thu, Oct 23, 2014 at 6:43 AM, Rajarshi Guha <[email protected] 
> <mailto:[email protected]>> wrote:
> As Yannick pointed out, toString() is not the right way to access the values. 
> But more importantly, it expects 3D coordinates. While it throws an exception 
> if 3D coordinates are not available, it might generate NaN if the Z 
> coordinate is set to 0 (flat molecule) or else if the covalent radius for an 
> element is not available. A reproducible example would be helpful
> 
> On Tue, Oct 21, 2014 at 5:11 PM, Zheng Shi <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi, 
> 
> I have puzzles regarding calculating LengthOverBreadthDescriptors with cdk. 
> When I use the class to calculate, I just get two "NaN""NaN" as the result. 
> Why is it? I get confused. I use the following class. Why is it? Thanks for 
> your help. 
> 
> LengthOverBreadthDescriptor le=new LengthOverBreadthDescriptor();
>               String s=le.calculate(molecule).getValue().toString();
> 
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho <http://p.sf.net/sfu/Zoho>
> _______________________________________________
> Cdk-user mailing list
> [email protected] <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/cdk-user 
> <https://lists.sourceforge.net/lists/listinfo/cdk-user>
> 
> 
> 
> 
> -- 
> Rajarshi Guha | http://blog.rguha.net <http://blog.rguha.net/>
> NIH Center for Advancing Translational Science
> 
> 
> 
> 
> -- 
> Rajarshi Guha | http://blog.rguha.net <http://blog.rguha.net/>
> NIH Center for Advancing Translational Science

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to