Author Topic: About visualizing lammps output  (Read 4089 times)

0 Members and 1 Guest are viewing this topic.

Offline amburan

  • New QuantumATK user
  • *
  • Posts: 2
  • Country: us
  • Reputation: 0
    • View Profile
About visualizing lammps output
« on: May 25, 2016, 21:16 »
Hi,

I am trying to use the MD Analyzer to visualize the velocity distribution of a LAMMPS output. If I dump "all" the atoms from the lammps simulation using:

dump            d_trajectory all custom 100 trajectory.dat id type x y z vx vy vz

 everything works fine, but if I select a subset of atoms using

dump            d_trajectory subsetgroup custom 100 trajectory.dat id type x y z vx vy vz

, I get the following error while trying to plot the velocity distribution:

Traceback (most recent call last):
  File "./zipdir/NL/GUI/MainWindow/LabFloor/LabFloorModel.py", line 239, in load
  File "/home/sthomas/QuantumWise/VNL-ATK-2015.1/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSLabFloorPlugin.py", line 67, in load
    data = reader.getTrajectory(filename)
  File "/home/sthomas/QuantumWise/VNL-ATK-2015.1/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSReader.py", line 390, in getTrajectory
    velocities_present)
  File "/home/sthomas/QuantumWise/VNL-ATK-2015.1/lib/python2.7/site-packages/AddOns/LAMMPSPlugins/Filters/LAMMPSReader.py", line 601, in _getPositionsAndElements
    raise NLFileError("Incorrect file line found: %s" % (traj_file_content[line_number]))
NLFileError: Incorrect file line found: 577 1 1.35125 -14.8637 6.75625 -0.00295542 0.000169555 0.00180072

Kindly let me know if there is a way to analyze a subset of the atoms?

Thank you,
Stephen Thomas.

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 164
  • Country: dk
  • Reputation: 25
    • View Profile
Re: About visualizing lammps output
« Reply #1 on: May 26, 2016, 09:58 »
Hi Stephen,

unfortunately, the current version of the LAMMPS importer plugin does not support trajectories that contain only a subset of the entire system.
We'll consider including this in the next release.

Offline amburan

  • New QuantumATK user
  • *
  • Posts: 2
  • Country: us
  • Reputation: 0
    • View Profile
Re: About visualizing lammps output
« Reply #2 on: May 26, 2016, 19:22 »
Hi Julian,

Thanks for letting me know.

For the velocity distribution calculation, do you use the magnitude of the velocity vector of each atoms at each time step and compute the average over the selected time span ? Also is f(v) on the Y axis the number of atoms and not number of atoms divided by the total number? Is there any way I can alter the velocity distribution plot to show the latter quantity?

Thank you,
Stephen Thomas.

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 164
  • Country: dk
  • Reputation: 25
    • View Profile
Re: About visualizing lammps output
« Reply #3 on: May 27, 2016, 10:07 »
Quote
For the velocity distribution calculation, do you use the magnitude of the velocity vector of each atoms at each time step and compute the average over the selected time span ?
Yes, exactly.

Quote

Also is f(v) on the Y axis the number of atoms and not number of atoms divided by the total number?
Yes, the number on the y axis is the average number of atoms  with velocities between v and v+dv in a snapshot. It is not normalized with the total number of atoms in the system.

Quote
Is there any way I can alter the velocity distribution plot to show the latter quantity?
Not in the MDAnalyzer-plot, but you can of course always extract the data from the plot into an ascii file using the "Export data" function in the context menu, that opens if you right-click on the plot. Then you can modify the data and plot it in an external tool, e.g. pylab.

You can also calculate the distribution directly in a script and then modify and plot it, as described in http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.velocitydistribution.html