-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in output when writing to .rst7 file #1604
Comments
Ah, I was just about to write a new issue of my own for exactly this problem (the errant 0 in the box line). In my case the correct output is:
But I'm getting:
That is to say, this isn't a matter of the leading '9' being cut off in your case, it really is being set to zero. I'm not sure when this started to be an issue but I know for sure it hasn't always been; I found this bug after running old code that used to work fine and getting an error that wasn't there before that I ended up tracing back to this. I'm currently working with version 2.0.5. For now, I've just switched my workflow to mdtraj, but it's quite a bit slower for this particular task, so I'd love a pytraj workaround or fix... By the way, the name having '.1' appended to it is a separate issue having to do with the 'multi' kwarg in traj.save (and related methods). That particular issue is much older... I've taken to including a step to rename the output file to remove the '.1' in all my code, but obviously that shouldn't be necessary. |
For the sake of troubleshooting, can you try to run this with cpptraj? E.g.
or using the input
and see if you get the same behavior? |
Can you please upload dummy file examples to reproduce? How did you get pytraj? |
Passing the broken restart file through cpptraj as suggested did not work (I think that's what you wanted me to do, right?) It gave the following output after trajin:
The output then has the exact same box line as the input (in fact the input and output files are exactly identical). Sorry for not including files to reproduce with before: I get this issue by simply loading these two files together and then saving it as a restart file. It seems not to be dependent on the style I use when loading or saving, but for example this works (as in, this reproduces the problem):
However, when I tried to reproduce this issue on my personal (MacOS) machine instead of on the remote Linux machine I was originally working on, I could not; the box line is written correctly, despite using the exact same input files, commands, and version of pytraj. Besides the OS, the only difference that comes to mind between these two environments is that the one that works has a direct installation of cpptraj (Amber is not installed) whereas the one that's not working has cpptraj through an installation of Amber 20. Both versions of cpptraj are 4.25.6. In both cases I believe I installed pytraj through conda. It's been a long time since I did either of these installations, and I was not the one who did the Amber installation. Sorry I can't be more specific. |
Dear @tuckerburgin Using my macbook:
So the best workaround is to install ambertools v22 that includes
PS: I don't have time to make a stand alone release for |
ah, I realized @sbkoby23 and @tuckerburgin are two different persons. I apologize to not reply to @sbkoby23 sooner. @sbkoby23 Please read my comment above. Thanks. |
So the file(s) will be |
@tuckerburgin I also cannot reproduce the issue with your files. What version of cpptraj are you using? If possible, can you try the latest GitHub version (6.6.1) and see if the issue persists on your platform? |
So for cpptraj, Amber restart files do not have the |
Hello,
I am trying to write a single frame to a .rst7 format and am getting several weird issues. I am attempting to run the following commands:
import pytraj as pt
traj = pt.load('complex0.rst7', 'complex0.prm7')
traj.save('complex_t.rst7', overwrite=True)
First of all, the output is saved as 'complex_t.rst7.1'. Second, the last line of the output file which specifies the box parameters is incorrect. It should read:
90.0000000 90.0000000 90.0000000 90.0000000 90.0000000 90.0000000
However, the output I am getting is the following:
0.0000000 90.0000000 90.0000000 90.0000000 90.0000000 90.0000000
Is there a work around for this issue?
The text was updated successfully, but these errors were encountered: