On 20.06.2012 11:05, Tim Vandermeersch wrote:
> On Wed, Jun 20, 2012 at 12:03 PM, Noel O'Boyle <baoille...@gmail.com> 
> wrote:
>>>>> run two instances of OBForceFieldMMFF94 are being created. I 
>>>>> would
>>>>> like
>>>>> to understand why is that, because I thought only one was 
>>>>> necessary
>>>>> and
>>>>> therefore I am confused about this.
>>>>
>>>> I don't know. You'd need to run a debugger or something like 
>>>> Valgrind
>>>> to figure out what part of the code is creating each instance. In
>>>> this
>>>> particular code, only one instance should be created.
>>>>
>>>
>>> Yes. That's also what I thought and that's the reason why I asked 
>>> you.
>>> I created an static variable in OBForceFieldMMFF94 to count how 
>>> many
>>> times the class is being instantiated and I found it was two every 
>>> time.
>>> Either when running obminimize or the ctest for mmff94.  I will try 
>>> the
>>> debugger and see if I can figure out what is going on.
>>
>> Is this because of the use of a templated class? There is one 
>> version
>> with <true> and one with <false> or something like this.
>
> The reason for this is probably because there is an instance for
> MMFF94 and one for MMFF94s.
>

You spotted correctly Tim. I used the ID that is sent when the class is 
created as an argument and find out one of the running instances is 
effectively MMFF94s.  Now my question is why this happens, even when I 
run obminimize and I explicitly ask to use MMFF94 (not MMFF94s)

$ time obminimize -ff MMFF94 -n 1000 forcefield.sdf

INSTANCE: 1 ID: MMFF94 - RUNNING THREADS = 4
INSTANCE: 2 ID: MMFF94s - RUNNING THREADS = 4

...

> Cheers,
> Tim
>
>> - Noel
>>
>> 
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. 
>> Discussions
>> will include endpoint security, mobile security and the latest in 
>> malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to