Calculator issue with LAMMPS dump file.

Hello,

I have a LAMMPS dumpfile of the form:
Id Type x y z vx vy vz

When I use the calculator filter I cannot use any of the imported variables. If I try to make a vector out of the velocity parameters I get the following error:

Syntax Error: expecting variable name at position 0.

This occurs even if the only thing in the equation bar is the variable. I’m not even typing the variables - I’m just clicking the button built in to the calculator to automatically place them.

I’ve tried adding a glyph of just the x velocity and looking at the data in Paraview and it does exist. I have no idea what is going wrong here.

Shane

does your expression look like that:

iHat*vx+jHat*vy+kHat*vz

using iHat, jHat and kHat would be the way to compose 3 scalars into a vector.

Yes. The issue is that the calculator is not recognizing my point arrays as variables (despite being variables under the scalar list). I’ve tried both iHat*vx+jHat*vy+kHat*vz and just vx to test this.

I’ve tried with both atom and custom dump styles and I still get the same error. Does anyone know how the Calculator generates the list of scalar variables in the drop down menu? Maybe the difference between that and what the equation bar accepts is the source of the issue.

It just iterates over the point data/cell data and puts each one in the dropdown and registers each as a variable name in the equation parser. Is your data multiblock? Or spread across multiple ranks? It may be pulling from the first block/rank and then that array is not present on some of the others. Do you have a small example dataset that exhibits the problem?

I have seen this error with multiblock datasets where not all blocks had the referenced variable. However, in examining the Spreadsheet view, the calculator output was available for the blocks which had those variables.

YMMV

Here is a small data file exhibiting the same issue. The variables xs ys and zs can’t be accessed by the calculator.
cluster.dump (1011.4 KB)

https://drive.google.com/open?id=11W36J_iciEvVu3wsbcpyQVxDdctQJKKt

Thank you for all the help!

The LAMMPS reader creates a multi-block dataset, with the unitCell (enabled by default), and the mesh (disabled by default). You presumably enable reading, and creating the “mesh” object as well. A vtkPolyData mesh is created with N cells and N vertices (for N atoms) with the scalars fields attached to it. Note that the uniCell has no data attached to it, and that is why you see the error.

The easiest way to read your data and use the calculator without errors would be to disable the reading of the unitCell, and only enable the “mesh”. Or to read both, but use an ExtractBlock to only select the “mesh” object, before passing it to the Calculator.