Skip to content
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

Trying to run PENSA with AMBER files #75

Open
MauricioMartil opened this issue Feb 11, 2025 · 3 comments
Open

Trying to run PENSA with AMBER files #75

MauricioMartil opened this issue Feb 11, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@MauricioMartil
Copy link

Hi

I have been trying to run PENSA on my trajectories from AMBER. I generated the .psf file using parmed and used my own .incprd and .prmtop but whenever I try to run extract_coordinates.py, I am getting the following error message:

Traceback (most recent call last):
File "/media/mauricio/Expansion/POT1/pensa_pot_test/work/../../AF/a/pensa/scripts/extract_coordinates.py", line 29, in
extract_coordinates(args.ref_file, args.pdb_file, args.trj_file,
File "/media/mauricio/Expansion/POT1/AF/a/pensa/pensa/preprocessing/coordinates.py", line 44, in extract_coordinates
selection.write(out_name + '.prmtop')
File "/home/mauricio/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/core/groups.py", line 3756, in write
raise ValueError("No writer found for format: {}".format(filename))
ValueError: No writer found for format: traj/D51N_POT1.prmtop

I would like to know how I could make PENSA work using NetCDF coordinates.

Copy link

Congras on the first issue!

@martinvoegele martinvoegele self-assigned this Feb 12, 2025
@martinvoegele martinvoegele added the enhancement New feature or request label Feb 12, 2025
@martinvoegele
Copy link
Collaborator

Hi Mauricio, thanks for raising this issue!

It looks like you are trying to modify the function extract_coordinates() to write a PRMTOP file instead of GRO and PDB. Correct?

MDAnalysis — on which PENSA in-/output relies — only allows reading prmtop and psf files but not writing them. You can find a list of file formats supported by MDAnalysis here:
https://userguide.mdanalysis.org/stable/formats/index.html#coordinate-readers
Unfortunately, this limits the options to modify PENSA output.

Why would you like the output to be in NetCDF format? Depending on this, maybe there are other options to reach your goals.

@MauricioMartil
Copy link
Author

Hi Martin!

Yes, I was trying to make some changes because I was not sure if PENSA only worked with XTC, GRO and PDB. So, from what I could see MDAnalysis should be fine with reading the NC files but I could see if I can use MDAnalysis or MDtraj to convert my PRMTOP and NC to GRO and XTC files.

I might need to add a line to the scripts so it can make that conversion. Sorry, I do not need the output to be in NetCDF, I think I did not expressed myself very well.

In the documentation, it is not very clear on how to make PENSA work with AMBER files, but also It could be that there is something different or wrong with my files.

On another note, I also got this other error:

Traceback (most recent call last):
File "/media/mauricio/Expansion/POT1/pensa_pot_test/work/../../AF/a/pensa/scripts/extract_coordinates.py", line 29, in
extract_coordinates(args.ref_file, args.pdb_file, args.trj_file,
File "/media/mauricio/Expansion/POT1/AF/a/pensa/pensa/preprocessing/coordinates.py", line 43, in extract_coordinates
selection.write(out_name + '.pdb')
File "/home/mauricio/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/core/groups.py", line 3674, in write
raise IndexError("Cannot write an AtomGroup with 0 atoms")
IndexError: Cannot write an AtomGroup with 0 atoms

Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants