-
Notifications
You must be signed in to change notification settings - Fork 4
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
The lammps output file analyzes dipole Angle distribution of water #33
Comments
@zdxing1 This seems like an issue with the DCD reader, could you confirm what version of MDAnalysis you are using please? You can do the following to find the version:
|
I'm using version: |
Thanks @zdxing1 - I don't have the capacity to think this one through yet sorry. Maybe one of the @MDAnalysis/coredevs can weigh in here? |
Can you read the DCD file by itself, i.e. pdb = '.../OH2.pdb'
path = '.../water.dcd'
u = MDAnalysis.Universe(pdb,path)
print(u.trajectory)
for ts in u.trajectory:
print(ts.frame) If this fails somewhere then it has nothing to do with waterdynamics. How did you generate the DCD file? Are you able to read the DCD file with other tools, e.g., VMD? |
The dcd file can be imported in vmd, but an error occurred when the pdb file was imported. Is this pdb file the original model's pdb file? |
It's okay. Thanks. |
After modifying the pdb file, it can be opened in vmd and the program can be run. Your example code runs numbers from 0 to 15000. The graph produced by the final program does not have any curves, may I ask what is the problem, and the following is a warning. D:\python\python.exe D:\桌面\ceshijiaodu.py |
If you can read the DCD file now then you should be able to use the analysis tools.
|
Thank you for your reply. |
Expected behavior
What types of files need to be entered here, and is this due to version problems?
Actual behavior
'''
Warning (from warnings module):
File "D:\python\Lib\site-packages\MDAnalysis\analysis\hbonds\hbond_autocorrel.py", line 52
warnings.warn(wmsg, category=DeprecationWarning)
DeprecationWarning: This module was moved to MDAnalysis.analysis.hydrogenbonds.hbond_autocorrel; hbonds.hbond_autocorrel will be removed in 3.0.0.
Warning (from warnings module):
File "D:\python\Lib\site-packages\MDAnalysis\topology\PDBParser.py", line 331
warnings.warn("Element information is missing, elements attribute "
UserWarning: Element information is missing, elements attribute will not be populated. If needed these can be guessed using MDAnalysis.topology.guessers.
Traceback (most recent call last):
File "D:\桌面\角度分布.py", line 8, in
u = MDAnalysis.Universe(pdb,path)
File "D:\python\Lib\site-packages\MDAnalysis\core\universe.py", line 375, in init
self.load_new(coordinates, format=format, in_memory=in_memory,
File "D:\python\Lib\site-packages\MDAnalysis\core\universe.py", line 580, in load_new
self.trajectory = reader(filename, format=format, **kwargs)
File "D:\python\Lib\site-packages\MDAnalysis\lib\util.py", line 2553, in wrapper
return func(self, *args, **kwargs)
File "D:\python\Lib\site-packages\MDAnalysis\coordinates\DCD.py", line 144, in init
self._file = DCDFile(self.filename)
File "MDAnalysis\lib\formats\libdcd.pyx", line 168, in MDAnalysis.lib.formats.libdcd.DCDFile.cinit
File "MDAnalysis\lib\formats\libdcd.pyx", line 275, in MDAnalysis.lib.formats.libdcd.DCDFile.open
File "MDAnalysis\lib\formats\libdcd.pyx", line 312, in MDAnalysis.lib.formats.libdcd.DCDFile._read_header
OSError: Reading DCD header failed: premature EOF found in DCD file
'''
Code to reproduce the behavior
Current environment
python -c "import waterdynamics; print(waterdynamics.__version__)"
)python -V
)?pip list
?conda list
?The text was updated successfully, but these errors were encountered: