QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: lhuang on April 5, 2016, 19:29
-
Hello,
I am trying to figure out how to use VNL to visualize calculations from Lammps. Here is the error message I received:
Traceback (most recent call last):
File "./zipdir/NL/GUI/MainWindow/LabFloor/LabFloorModel.py", line 240, in load
File "/Applications/Virtual NanoLab 2014.3.app/Contents/Resources/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSLabFloorPlugin.py", line 58, in load
data = reader.getTrajectory(filename)
File "/Applications/Virtual NanoLab 2014.3.app/Contents/Resources/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSReader.py", line 457, in getTrajectory
analysis_object._append(ase_atoms_interface, time=float(time.inUnitsOf(Units.fs)), step=frame_index)
File "./zipdir/NL/Dynamics/MolecularDynamics/MDTrajectory.py", line 108, in _append
File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 264, in get_forces
File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 142, in _update
File "/Applications/Virtual NanoLab 2014.3.app/Contents/Resources/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSReader.py", line 477, in _getPotentialEnergy
raise NLValueError('The LAMMPS log file contains fewer potential energy values than snapshots in the trajectory.')
NLValueError: The LAMMPS log file contains fewer potential energy values than snapshots in the trajectory.
The example I ran is from the EAM example with the distribution.
I was using the lammps version, 10 August 2015. The VNL is version 2014.3, Mac OS:
System information
Build: 2014.3.ac46a6e
Platform: Darwin
Python 2.7.2
Qt 4.8.5
PyQt 4.10.3
3D graphics - OpenGL
Vendor: Intel
GPU: Intel(R) Iris(TM) Graphics 6100
Version: OpenGL 2.1 INTEL-10.6.33
Shading language version: 1.20
License
Source: Local
Greatly appreciate your time!
Best regards,
Paul
-
Hi Paul.
We will be happy to help you out here, but it will be much easier if you upload the relevant LAMMPS file(s).
-
Sure, I should have done this in the previous message: attached are the files used for the VNL-LAMMPS test. The actual trajectory file is larger than 512 KB. One shall be able to generate it using the "in.eim", "field.eim" and "data.eim" files.
The changes in "in.eim" are suggested by the tutorial:
thermo 10
thermo_style custom step temp press pe etotal
dump atK_traj all custom 10 trajectory.dat id type x y z vx vy vz
Thanks again!
-
The problem is that in your log.lammps file, for some reason there are some steps missing between step 260 and 410.
It says
200 834.82705 -445.10589 -5704.2444 -5488.5326
210 879.3483 -172.38307 -5712.4813 -5485.2655
220 922.65357 292.58809 -5720.4329 -5482.0275
230 937.39042 -62.6088 -5721.3306 -5479.1173
240 948.08463 -244.98762 -5721.6675 -5476.691
250 966.14585 442.59564 -5724.4679 -5474.8245
260 962.51755 581.39448 -5722.3955 -5473.6896 410 827.36123 -897.4114 -5746.4231 -5532.6403
420 834.65009 31.459134 -5754.7381 -5539.072
430 821.39706 887.94195 -5758.0841 -5545.8425
440 777.86776 -258.69939 -5753.6548 -5552.6607
Then, of course the plugin can't find as many energy entries as snapshots in the trajectory, and that's why the error is raised.
I don't know why that happens, but maybe you ran several LAMMPS simulations simultaneously, which wrote to the same logfile.
Try and run the LAMMPS simulation again, and see if the error still persists.
I have attached the log file that I get when I run your simulation and with that logfile everything works fine.