bio-phys / pydiffusion Goto Github PK
View Code? Open in Web Editor NEWAnalyse Rotational Diffusion Tensor from MD Simulations
License: Other
Analyse Rotational Diffusion Tensor from MD Simulations
License: Other
The analysis class behavior has changed. So some code from the setup method needs to go into the prepare function.
Hello,
I am trying to study the diffusion of a membrane embeded protein (KcsA specifically). I have been able to replicate the tutorial but I am getting some strange results with my system and I wonder if I am doing something wrong computationally or the theory doesn't work for these cases. I get these plots:
I understand why one of the main component doesn't converge since there is not a lot of vertical rotation of the protein. What I don't understand is why the other components don't converge to 0.25 as in the reset of examples in the paper and the tutorial.
Thank you very much for your help!
Best regards,
Sergio
Hi @kain88-de @jkoefinger ,
The method
rm = pydiffusion.rotation.RotationMatrix(u.atoms, ref=tetrahedron.atoms, verbose=True).run()
in the tutorial breaks when used with MDAnalysis v1.0.
The error comes from the
class RotationMatrix(AnalysisBase) in pydiffusion/rotation.py
The method _prepare()
in RotationMatrix overwrites the self.frames
definition of the parent class AnalysisBase
, causing trouble for the latter in the run()
method.
To fix this, I replaced all occurrences of self.frames
in class RotationMatrix
with self.Dframes
in my local copy of rotation.py
, corresponding to the following lines:
In method _prepare(self)
:
self.frames = [] --> self.Dframes = []
In method _single_frame(self)
:
self.frames.append(self._mobile.universe.trajectory.frame) --> self.Dframes.append(self._mobile.universe.trajectory.frame)
In method _conclude(self)
:
self.frames = np.asarray(self.frames) --> self.Dframes = np.asarray(self.Dframes)
This works, but there is perhaps a better way to address the issue.
Best,
Soeren
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.