MDAnalysis Universe error on PSF files #4724
-
|
Hello all, I want to ask for help in debugging an MDAnalysis universe error (reading PSF). I have these two PSFs where file QMESA works but PGFSA does not. I attached the two PSF file here. I generated them from cpptraj, where I stripped water, ions, and membrane. When I read these PSF in MDanalysis, the following error appeared ValueError: Failed to construct topology from file /net/gpfs-amarolab/PGFSA.stripped.step5_input.psf with parser <class 'MDAnalysis.topology.PSFParser.PSFParser'>.
Error: Expected section NPHI but found 5The PSF files worked well when I load them in VMD along with the trajectories from my MD simulations. Not sure on what else can I do to debug this or if there are other things I can do. Do you know how I can debug this properly? Thank you so much! Sincerely, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
In your file When I manually rewrite it to then MDAnalysis can read it. Will have to look if PSF must have a newline there (then it's a bug in the code you're using) or if MDAnalysis is to strict (then it's a bug in MDAnalysis). |
Beta Was this translation helpful? Give feedback.
-
|
Based on the official charmm PSFParser (charmm/source/io/psfres.F90), a blank line is required. if (qextfmt) then
idleng=8
if (prnlev >= 2) write(outu,'(a)') &
' psf_read_formatted: Reading PSF in the expanded format.'
fmt00='(/I10)'
fmt01= '(I10,1X,A8,1X,A8,1X,A8,1X,A8,1X,I4,1X,2G14.6,I8)'
....
else
idleng=4
fmt00='(/I8)'
fmt01='(I8,1X,A4,1X,A4,1X,A4,1X,A4,1X,I4,1X,2G14.6,I8)'
.....
endifThe formats used for both reading and writing have a leading slash, e.g. So I think MDAnalysis is handling the parsing correctly here. |
Beta Was this translation helpful? Give feedback.
Based on the official charmm PSFParser (charmm/source/io/psfres.F90), a blank line is required.
The formats used for both reading and writing have a leading slash, e.g.
fmt00='(/I10)'orfmt00='(/I8)'. In Fortran, the leading/in a format skips to the next record. On write, it emits a blank line f…