Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Alexander Stukowski

Pages: 1 ... 23 24 [25]
Support Forum / Re: LAMMPS sphere data format
« on: December 14, 2016, 04:20:05 PM »
I added the option to load and write LAMMPS data files with atom_style=sphere for you (Commit 5e4ba252).

The particle diameters read from the data file are automatically mapped to the "Radius" particle property in OVITO (after dividing by 2) and the density values are mapped to the "Mass" particle property (after multiplying with the particle volume).

Particles with radius=0 in the data file will be rendered using the default radius, which can be set in the particle display panel of OVITO.
Please download the latest development build from the website.

Support Forum / Re: Writing LAMMPS data file
« on: December 08, 2016, 08:24:09 PM »
No, I'm sorry, but OVITO's internal data model doesn't support "bond angles" (and other non-visual information used by the LAMMPS code). There is no way for OVITO to produce a LAMMPS data file like that.

Reading such files with OVITO should be possible though, and bonds and bond types are supported by the data model.

Let's suppose you would like to determine the global maximum of a particle property for every frame of a simulation and export this information to a text file. This can be done by inserting a Python Script modifier into the data pipeline. The following modifier script computes the maximum of the Potential Energy particle property and injects the value as a new global attribute into the data pipeline:

Code: [Select]
def modify(frame, input, output):
    max_energy = input.particle_properties['Potential Energy'].array.max()
    output.attributes['Maximum Energy'] = float(max_energy)

You can now use OVITO's standard file export function to generate a table of the Maximum Energy attribute and write it to a text file. Select Calculation Results Text File as output file format.

Support Forum / Re: Python Modifier Script
« on: November 26, 2016, 05:07:38 PM »
I leave it to you to work out an actual algorithm to select the molecules. But here is the boilerplate code you need to access the positions, types and molecule IDs of atoms, and to create the output selection property. Set the corresponding entries in the selection array to 1 for atoms that you would like to select.

Code: [Select]
from import *

def modify(frame, input, output):
    position = input.particle_properties.position.array
    type = input.particle_properties.particle_type.array
    molecule_id = input.particle_properties.molecule_identifier.array
    selection = output.create_particle_property(ParticleProperty.Type.Selection).marray

Could you please attach the two simulation files (the reference and the displaced configuration) if they are not too large?

The steps that you describe sound correct. I am wondering whether the simulation cell size did change after you equilibrate the displaced system? In other words, did you use a barostat in LAMMPS to relax the box size? If yes, you probably have to activate the "Eliminate homogeneous cell deformation" option in the WS analysis modifier to account for the expansion/contraction of the lattice.

Another thing makes me suspicious: When you let LAMMPS write a dump file, OVITO should pick up the periodic boundary conditions automatically. No need to activate them explicitly in OVITO. Did you perhaps use some non-standard file format like XYZ, which doesn't store PBC flags and box size information? This would likely lead to artefacts at the box boundaries when performing the WS analysis.

Support Forum / Re: Python Modifier Script
« on: November 23, 2016, 07:57:13 AM »
Unfortunately, the version of Ovito that you are using (I assume it's 2.7.1) contains a bug in the implementation of the "is" comparison operator, which always evaluates to false. That is why the assertion from the example fails even though the original assumption still holds: input and output cell both point to the same internal object.

Please remove the assert() statements and proceed with writing your own modifier, or install the current development release of Ovito, which comes with a completely new implementation of the Python bindings.

Let me know if you need further help with writing the modifier script. The next steps depend on what you would like your modifier to do.

Support Forum / Re: Two bugs with ovito?
« on: November 03, 2016, 04:50:17 PM »
No, I'm sorry. The Voronoi polyhedra are not permanently stored by OVITO after computing their volume and counting their faces. And there is no function for visualizing the polyhedra.

Support Forum / Re: Two bugs with ovito?
« on: November 03, 2016, 09:06:54 AM »
I'm happy seeing the first question being posted on this board.

1) Some MD codes store the atomic positions in reduced coordinates in XYZ files. OVITO tries to detect this case by analyzing the range of the XYZ coordinates. If XYZ coordinates of all atoms fall into the range [-0.01, 1.01], then OVITO assumes they are given in reduced units and will rescale them to absolute coordinates while reading the file. Unfortunately, in your dataset, the absolutes coordinates are all within this range, so OVITO is doing the wrong thing. I will think about how to improve this defection heuristic for reduced XYZ coordinates. But it may be that the only solution is to introduce an explicit user option that suppresses the automatic rescaling of coordinates.

For the time being you can work around the issue by making sure some of the coordinates in your XYZ file are outside the [-0.01,1.01] range. For example, you can shift all Z coordinates by one box length, which is 1.0. Then apply the Wrap at Periodic Boundaries modifier within OVITO to map the atoms back into the box. I have attached a modified version of your file to demonstrate this.

2) First: There is no apparent difference between the two numbers in the error message because not enough decimal places are shown. The difference is <1e-4 but still large enough for OVITO to complain about it. I will make sure that more decimal places are printed in the error message in the future.

Regarding the cause of the message: As a sanity check, OVITO computes the sum of all Voronoi cells and compares it to the volume of the simulation cell. The two numbers should always match unless some atoms are located outside of a (non-periodic) simulation cell. In this case the Voronoi cells computed for atoms not inside the cell are invalid and OVITO warns you about this. However, even if the calculation is correct, due to numeric errors the sum of Voronoi cells might not exactly match the cell volume. So OVITO works with a threshold to tolerate a small deviation. This threshold was chosen too small in OVITO 2.7.1 and previous versions, which could led to false alarms like in your case. In the current development version the threshold has been raised and the error message goes away. So please download the current development version of OVITO from the website.

Only certain particle properties such as Force, Displacement and Dipole Orientation are rendered as arrows by OVITO. To visualize a custom vector property, map it to one of these standard properties.
  • This can either happen directly during import of the data file. Some file readers like the LAMMPS dump and XYZ reader allow you to define a custom mapping of file columns to particle properties. Use the Edit Column Mapping button to assign your vector data to the Force property, for example.
  • Alternatively, use a Compute Property modifier to set the values of the Force property to the values of your vector property.

Pages: 1 ... 23 24 [25]