Author Topic: Compute Property Question  (Read 3111 times)

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Compute Property Question
« on: October 18, 2017, 09:04:37 PM »
Hi,
I am new to Ovito and trying to use Compute Property.  Loaded successfully a LAMMPS files.  I then added compute property modified.  Just for a test: I used Displacement property and defined them as X = Position.Z -10.0; Y=Position.Y-10 and Z = Position.Z-10.
I believe that Displacement will be stored somewhere as particle property. What is the next step? How do I view the property?

Same is for Atomic Strain.  I have loaded the LAMMPS files and a reference file.  How do I view the atomic strain?

When I run the trajectory, both of these modifier, it is flashing with every trajectory "Waiting for the input to be ready"
Thanks
Debasis

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #1 on: October 19, 2017, 01:14:08 PM »
Dear Debasis,

Yes, you are right: The Compute Property modifier stores the computed values as a new particle property which is non-visual at first. There are various ways to make that data visible.

For a vector property such as "Displacement", Ovito can render an arrow for each particle in the viewports. For this, you need to check the box next to the "Displacement" entry under the "Display" section of the pipeline editor. See the attached screenshot.

Another option to make property data visible is to use the Color Coding modifier to translate a scalar property (e.g. "Shear Strain" computed by the Atomic Strain modifier) into a particle color. So if you add this modifier to the pipeline, particles will be assigned a color based on the value of the selected particle property.

-Alex

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #2 on: October 20, 2017, 05:30:32 PM »
Thank you Alex for your help. I was able to plot strain on top of each particle.  I have another question though. How does it calculate the strain?  I am assuming the following:

1.  Use the reference configuration and for each particle calculate the bond length (within the cutoff distance).
2.  Take the maximum bond distance and store it.  Do it for all particles.  This is the initial length (reference configuration.
3. For the trajectory:  you do the same and compute the difference in bond length from the reference bond length
4.  Divide by the corresponding reference bond length. 

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #3 on: October 21, 2017, 05:39:34 PM »
The atomic strain calculation is a little more elaborate than comparing average bond lengths. First, an atomic deformation gradient tensor is calculated, from which the atomic strain tensor and finally the volumetric and shear strain values are derived.

You can find technical details in the OVITO user manual and in section 3.2 of the attached document.

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #4 on: October 23, 2017, 04:22:51 PM »
Thank you Alex for the paper.  Excellent description of the inner details.  Is gamma(i) in Equation (7) plotted on particles when using atomic strain modification?  And shows under the color coding and histogram modifications with "particle property" as "Shear Strain"?

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #5 on: October 23, 2017, 05:22:41 PM »
Yes, the scalar "Shear strain" property, which is output by the Atomic Strain modifier of OVITO, is computed according to equation 7 in the book chapter.

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #6 on: October 24, 2017, 09:07:52 PM »
Hi Alex,
So far I was viewing the shear stain with color coding for the cases I ran. I used the reference External File as the same as main file, but use only the first frame.  I was getting, as expected, the shear strain for the first frame of the lammps dump file as very close to zero.  These simulations had orthogonal simulation cell.  Now I have loaded a dump file for a non-orthogonal case and use the same data file as reference as I did before.  Surprisingly I am seeing shear strain value that are more than 0.2 for the zeroth frame.  Shouldn't it be zero?  May be I am not doing something right.  I have added an a pdf attachment.

Thanks
Debasis

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #7 on: October 24, 2017, 09:57:55 PM »
Yes, if the reference configuration is the same as the current configuration, then the (shear) strain values should be virtually zero for all atoms.

You are saying that this was indeed the case for the first simulation you analysed, but for some reason it is not the case for the second simulation (with the sheared simulation cell).

From what you wrote and the screenshots I cannot tell what went wrong. It might be necessary that you also upload the original data files so that we can reproduce the problem.

There is a typical source of error that can lead to unusually large strain values. Please check if it applies to your case:

For the atomic strain calculation the displacement of each atom needs to be computed. This requires that each atom has a unique identity so that its motion can be tracked over time. LAMMPS (assuming that is the MD code you use) tends to reorder atoms from time to time during a simulation. If you didn't write out the atomic IDs to the dump file, then OVITO might create a wrong mapping between the atoms in the current and the reference configuration. The computed atomic displacements and strains will then come out wrong.

However, this problem can only arise if the current and the reference configuration are not loaded from one and the same file. If it is the same file, then we'll have to look for other explanations. Did you check if the value of the Cutoff Radius parameter or the Eliminate Homogeneous Cell Deformation option have any influence on the computed strain values?

Best,
Alex

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #8 on: October 24, 2017, 11:26:26 PM »
I did a quick check for cut-off dependence.  Here is what I get for zeroth time step when both refer and dynamic frames are identical:

Rc         max Strain           Min Strain
3.2       3.1e-5                2.4e-8
5.0       2.3e-6                1.5e-8
7.0       9.6e-7                 1.0e-8
10       5.9e-7                 1.1e-8
15       0.15                     0.024
20       0.27                     0.28

 Eliminate Homogeneous Cell Deformation did not have any significant effect.  Simulation is actually for molecular crystal rather than atomic crystal.  So most deformation should come from the separation of the intermolecular distance rather than intramolecular bonds (which just fluctuate by smaller amount when the system is strained along Y axis). So every molecule can be replaced by a its centroid coordinate, and the next neighbor distance should be much larger than that in an atomic crystal.  Let me know if you still want the coordinates.

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #9 on: October 25, 2017, 12:27:47 PM »
Your table shows that the results are correct for smaller cutoff radii but appear to be incorrect for large cutoff radii (cutoff on the order of the simulation cell size).

I can think of two possible sources for this error:

  • The atom neighbor lists generated by OVITO for the non-orthogonal (sheared) simulation cell are wrong and lead to incorrect strain calculation results
  • Or the minimum image convention used in the strain calculation routine leads to wrong results

I would like to investigate this issue further (and hopefully solve it). For that, it would be helpful if you could send/upload your simulation file. Just the first frame should be enough.
Thanks.

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #10 on: October 25, 2017, 03:31:56 PM »
Alex,
attached is the first time step. 
Thanks
Debasis

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #11 on: October 27, 2017, 12:03:08 PM »
Thanks. I was able to reproduce the problem. But I now think that is not related to your particular dataset or the fact that your simulation cell is sheared.

The problem is the large cutoff radius. As soon as it is larger than half the periodic box size (in your case the cell size along the z-axis), the relative displacements vectors calculated by the atomic strain algorithm turn out wrong. The reason is some sort of ambiguity and/or the minimum PBC image convention.

I am still trying to figure out whether that ambiguity can be resolved or not. For the time being, I suggest you use a smaller cutoff radius. In any case, there is not really a point in using a cutoff distance which is on the order of the simulation cell size. Only smaller cutoffs, typically on the order of a few interatomic distances, will give you spatially resolved strain information.

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #12 on: October 27, 2017, 03:47:37 PM »
Thank you Alex !

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Compute Property Question
« Reply #13 on: November 01, 2017, 05:28:05 PM »
A quick update:

I have revised the routine for calculating the atomic deformation tensors and it should now handle large cutoffs better when the simulation cell is periodic. The updated code is included in build 3.0.0-dev52 and later. 

debasis Sengupta

  • Newbie
  • *
  • Posts: 12
Re: Compute Property Question
« Reply #14 on: November 02, 2017, 03:34:36 AM »
Thank you !