ajkerr0 / kappa

A python package to calculate thermal conductivity across molecular interfaces.
MIT License
6 stars 4 forks source link

Unexpected values in thermal conductivity calculation #67

Closed ajkerr0 closed 8 years ago

ajkerr0 commented 8 years ago

Using two amines attached to a default cnt (ball and spring matrix activated) as a test case.

Even in the ball and spring approximation (with the BaS Hessian) we see that the P_{i -> j} terms corresponding to the +1 coordinates (y-direction) or different than the +0,+2 (x,z) coordinate contributions. This is seen even after molecules are rotated as a reality check. This is an indication of indexing error somewhere?

Whats even more peculiar is that when interactions is mol.angleList (vs mol.bondList) in the calculation routine, we get DIFFERENT VALUES for each of the terms. The expected non-zero terms remain non-zero, but different. This is totally unexpected and unintended and it must be an indication of a major error occuring somewhere in the calculate_thermal_conductivity routine.

We should test to make sure we are getting the same errors in ipython notebooks vs. standard python module execution.

ajkerr0 commented 8 years ago

On my home machine I do not get the second error mentioned above (changed values based on interactions list used) and this is in the ipython notebook environment.

ajkerr0 commented 8 years ago

Back on work machine; attaching amines on the same indices as on the home machine (70,1) eliminates the error like mentioned above BUT using indices (147, 75) (which is what I was running before when I first wrote this issue) causes the problem.

These issues are getting weirder and weirder.

Also, writing a separate _calculate_power function in its own namespace provided slightly different answers.

Seeing the same results in the ipython notebook and standard module run.

ajkerr0 commented 8 years ago

The separate _calculate_power function only changes the answer for the (147, 75) indices, NOT for the (70,1) indices (for interactions = mol.bondList) case.

This makes things even more confusing for me, but might actually help us narrow down the problem.

Are either sets of indices special? Does one change when all others dont or is the reverse true?

ajkerr0 commented 8 years ago

Different values could easily be attributed to the randomization of the driving atoms, actually.

ajkerr0 commented 8 years ago

Pay special mind to how the code works with multiple drivers and if we get answers we expect. Right now we get n terms printed out for each Pi-j where n is the number of drivers on that side. The total affect of having more attachments/drivers does seem to improve the conductivity.

ajkerr0 commented 8 years ago

Doing the brute force loop fixed this issue, but need to correctly parallelize the calculation.