djay0529 / mdanalysis

Automatically exported from code.google.com/p/mdanalysis
0 stars 0 forks source link

Setting unitcell dimensions #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am trying to create a trr file using position and force data that I have. 
What I am doing is similar to this example in this link 
(https://mdanalysis.googlecode.com/svn/trunk/doc/html/documentation_pages/coordi
nates/TRR.html). However, there is no command to add box information to the trr 
file while its writing (for example: ts._box similar to ts._pos).

1) Is there a command that can add box info to TRR file?
2) If not, can you add this option to Mdanalysis?

Thanks

Mohammad

Original issue reported on code.google.com by mohd.alw...@gmail.com on 17 Dec 2014 at 9:11

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Mohammad,

a quick hack to also change the box is to modify ts._unitcell. For XTC/TRR it 
records the box vectors [[ax,ay,az], [bx,by,bz], [cx,cy,cz]].

Doing this in a better way through ts.dimensions would be good so I am renaming 
the issue. Ideally, the following should eventually work:

  ts.dimensions = [A,B,C, alpha,beta,gamma]

(i.e. setting the unitcell using MDAnalysis' canonical format, which is then 
translated to whatever the trajectory writer needs).
Oliver

Original comment by orbeckst on 17 Dec 2014 at 11:44

GoogleCodeExporter commented 9 years ago
Thanks Oliver!

I tried the ts.dimension but it did not work, however, the ts._unitcell did the 
job.

Thanks

Mohammad

Original comment by mohd.alw...@gmail.com on 18 Dec 2014 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by richardjgowers on 10 Jan 2015 at 5:49

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 00952ec921d9.

Original comment by richardjgowers on 11 Jan 2015 at 1:10