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 - Constanze Kalcher

Pages: [1] 2 3 ... 10
1
Hi Sacho,

1) I don't think you would get more information from the bond angle distribution or bond order parameters. It just seems that at that temperature you're using crystallization cannot occur (yet).

2) I haven't been familiar with the concept of the Honeycutt-Anderson index, but yes, the CNA indices of an atom with icosahedral coordination have to be 12 x (555).
The two notations seem to be a little different though:
    - The first HA index is not used in the CNA notation since OVITO only performs the analysis if a bond exists. As you said above that would always be "1" for all the CNA indices you get.
    - The second and third index in the HA-nomenclature are the same as the first and second CNA-index.
    - I don't have a good understanding what the fourth HA index represents. Yes, it's used to distinguish between different topologies of the clusters, but in what way? The third index in the CNA notation is more specific since it represents the length of the longest continuous chain of bonds from all the bonds between common neighbors.

3) Yes, by default the order will be same as in the input file. This is something you should pay attention to if you want to average atomic properties over different time frames and the order of the atoms is not the same in every frame. That can be the case for lammps dump files for example. What you should do then is either use the property "Particle Identifier" instead to index atoms or activate the option "sort_particles=True" in the import_file() function. See section "Particle ordering" in the manual:
http://www.ovito.org/manual_testing/python/modules/ovito_io.html

-Constanze

2
Support Forum / Re: The example of python scripts
« on: July 17, 2019, 04:20:35 PM »
I see. This example dump file is indeed only available on gitlab, where the source code is hosted.
You can download it from here:
https://gitlab.com/stuko/ovito/blob/master/examples/data/CuZr_metallic_glass.dump.gz

-Constanze

3
Hello Sacho,
you might want to try the Polyhedral template matching (PTM) modifier instead of the Common neighbor analysis (CNA) modifier, since the PTM approach promises greater reliability than the CNA in the presence of strong thermal fluctuations and strains. See the corresponding manual entry for more details:
 https://ovito.org/manual_testing/particles.modifiers.polyhedral_template_matching.html

Anyhow, may I ask what your expectation for your system is? I have no information about the temperature you were running the simulation, but the snapshot you're showing here looks like you fully melted your metal. In that case it makes sense that that the Voronoi signature of the liquid is quite "scattered" as you describe it.

-Constanze

4
Sorry I have to ask again, what do you mean by "bond angle distribution centered on each atom"? Do you want to see how the bond angle between a specific bond pair is evolving with time (i.e you have more than just one frame)? Or do you want to have a histogram of the bond angle distribution created from all bond-vector pairs in your system (with the additional constraint that you want certain particle types as central particles)? In the latter case the code snippet you posted above should work.

-Constanze

5
Hello,
Concerning your first question, yes, you can access individual bond vectors and calculate the angle between a pair of bond vectors. Here is the link to the scripting reference of the latest developer version of ovito:
https://ovito.org/manual/python/modules/ovito_data.html#ovito.data.Bonds

As for your second question, could you please again explain what you're trying to do?

-Constanze

6
Support Forum / Re: The example of python scripts
« on: July 16, 2019, 10:06:56 AM »
Hello ZIYU CONG,

I'm not sure what you mean by "I cannot find the data file in the example". Could you please explain again what you're problem is?

-Constanze

7
Hello Sacho,

as explained both in the manual and in the comments of the code example, for each particle in your system this script prints a histogram of the CNA indices (which are triplets of indices) for each bond from the topology of the surrounding bond network.
http://www.ovito.org/manual_testing/python/introduction/examples.html#example-compute-cna-bond-indices

To be able to assign a structure type to a particle, each particle's list of triplets then is compared to a set of signature references. As an example, in an fcc structure each particle will have 12 neighbor bonds thus 12 triplets. Moreover all of those have to be of (421) type. An hcp-coordinated atom has six bonds of (4 2 1) type and six of (4 2 2) type.
Have a look at this paper for a more detailed description:
https://iopscience.iop.org/article/10.1088/0965-0393/20/4/045021/meta

It's not quite clear to me if you're goal is to create a histogram of all CNA indices or only the structure types of the particles. In the latter case, it is enough to just apply the Common neighbor analysis modifier and then create a histogram from the particle property "Particle Type".

-Constanze


8
Support Forum / Re: Get frame file path
« on: July 05, 2019, 04:02:24 PM »
Dear Linyuan,

when you loop over your frames you can simply check the global attributes of each frame, which contain additional information like the current timestep 'Timestep', frame 'SourceFrame' or file path 'SourceFile'.
Try, e.g.
Code: [Select]
from ovito.io import *
pipeline = import_file("yourfilename*.cfg.gz")

for frame in range(pipeline.source.num_frames):
    data = pipeline.compute(frame)
    print(data.attributes['SourceFile'])

Does that answer your question?

-Constanze

9
Dear zahid,

in that case you cannot use the Displacement vector modifier, since the positions of every atom in the current and reference position will be compared.

-Constanze

10
Support Forum / Re: Tio2 mechanical analysis
« on: July 03, 2019, 02:51:55 PM »
Dear Bahman,

no that wouldn't make any sense. As described in the manual, the CNA supports only the following structure types:
1 = FCC, face-centered cubic
2 = HCP, hexagonal close-packed
3 = BCC, body-centered cubic
4 = ICO, icosahedral coordination

http://www.ovito.org/manual/particles.modifiers.common_neighbor_analysis.html

-Constanze

11
Support Forum / Re: minimum distance between two atoms
« on: June 28, 2019, 09:59:41 AM »
Hello Dourna,

a DataCollection is a container class holding together individual data objects, each representing different fragments of a dataset. For example, a dataset loaded from a simulation data file may consist of particles, the simulation cell information and additional auxiliary data such as the current timestep number of the snaphots, etc. In the GUI, when you import your dump file, everything is automatically set up for you.

Your goal is to find the shortest distance between two particles, so yes, the position vectors is all you need.
Have you tried the modifier function I posted above? It already is the solution to your question: The Nearest Neighbor function NearestNeighborFinder(1, data).find(index) returns an iterator that visits the N nearest neighbors
of the given particle in order of ascending distance (although in your case there will be just 1 neighbor anyways). It also returns an object (in the above script called neigh) with the following attributes: index, distance, distance_squared, delta, see manual for more details:
https://ovito.org/manual_testing/python/modules/ovito_data.html#ovito.data.NearestNeighborFinder
So there is no need to implement that yourself.
In the GUI, simply add a Python modifier https://ovito.org/manual_testing/particles.modifiers.python_script.html, click on "Edit script" and copy the above code snippet into the text editor.
 
-Constanze

12
Support Forum / Re: minimum distance between two atoms
« on: June 27, 2019, 12:13:39 PM »
Hello Dori,

here is an example of a custom modifier function that uses the nearest neighbor finder function of OVITO to find the closest neighbor of each particle and then loops over all those neighbor distances to find the minimum.
Code: [Select]
from ovito.data import *

def modify(frame, data):
    finder = NearestNeighborFinder(1, data)
    neighbor_pairs = [ (neigh.distance, index, neigh.index) for index in range(data.particles.count) for neigh in finder.find(index)]
    print("min_dist \t Index_A \t Index B")
    print(min(neighbor_pairs))

-Constanze

13
Dear Bahman,

it depends on what you would like to do specifically, but if you have used the Wigner-Seitz defect analysis modifier you will have created two global attributes "WignerSeitz.vacancy_count" and "WignerSeitz.interstitial_count". Global attributes can be easily exported to a text file using the File-export function "Table of values" in the GUI.
https://ovito.org/manual_testing/particles.modifiers.wigner_seitz_analysis.html

-Constanze

14
Support Forum / Re: Affine mapping of the simulation cell
« on: June 12, 2019, 12:16:36 PM »
Dear Bahman,

if you don't have periodic boundary conditions in z-directions and also the size of your simulation is changing than this option should not be applied.

-Constanze

15
Hello,

I'm wondering is there any particular reason you're using an outdated version of OVITO?
In OVITO 2.9 you could use the Compute bond length modifier for that.
https://ovito.org/manual/particles.modifiers.compute_bond_lengths.html,
whereas in OVITO 3.0 the latter has been removed since it can be done with the Compute property modifier, as you were already trying to do.
https://ovito.org/manual_testing/particles.modifiers.compute_property.html

-Constanze

16
Support Forum / Re: Regarding Wiegner Seit modifier
« on: June 09, 2019, 03:53:51 PM »
Dear Bahman,

the difference is that you are referring to the OVITO 2.9 manual, whereas ovito.org/manual_testing is the manual of the latest developer version.
You'll see this if you follow the links to the documentation of the respective OVITO versions on the download page.
https://ovito.org/index.php/download

-Constanze

17
Support Forum / Re: How to View only the Particles which I selected
« on: June 07, 2019, 12:02:36 PM »
Dear Masato,

I'm note sure I understand the issue correctly, what do you mean by "backcalculate" the particles?
If you only want to view a certain particle type or monomer type for example, you could use the Select particle type modifier to select the particle types you don't need and then delete them.
If you want to visualize particles with a specific particle identifier only (let's say ID = 10), you can simply use the Expression select modifier to select all others:
Expression: "ParticleIdentifier != 10"
and then apply the Delete selected particles modifier on your selection. Does that answer your question?
The same could be achieved by applying an Expression selection "ParticleIdentifier == 10" in conjunction with the Invert selection modifier and then Delete selected particles modifier.

-Constanze

18
Hi shanis,

yes, the number of clusters can of course vary in every frame. Which clusters would you like to further examine? From your first post I assumed that it's the biggest five. Seems that that's not the case.

 
-Constanze

19
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: June 04, 2019, 11:17:03 AM »
Hi,
no this is not how that works. The neighbor expression is really:
NeighborExpression: @MoleculeID == MoleculeID
Also, I assume the cutoff needs to be much larger, in order to assure that you're not missing any neighboring atoms. However, it seems like the Compute property modifier caused even more confusion.

So I suggest you to try to solve this with a python script like I explained above and let us know if you're stuck.

-Constanze

20
Hello Peter,

this might be helpful
https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

and also the link to the OVITO code if you're interested in the technical details:
https://gitlab.com/stuko/ovito/blob/master/src/core/utilities/linalg/Quaternion.h#L283-318

-Constanze

21
Hello shanis,

1. can you explain why it does not work for you? In principle you should be able to loop over all frames and clusters without any problem.
2. If you like you can upload that problematic frame for us here so we can try to understand the problem. For now, in order to avoid your analysis script to crash you could use a try/except python statement.

-Constanze

22
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: June 04, 2019, 10:05:46 AM »
Dear jaguarjom123,

you're right, the code snippet I posted above was meant for ovito 3. And yes, the error in line 16 was a typo, thanks for pointing that out. I corrected that in the above version.
Concerning your second question, I think it's easiest if you loop over all particles and then - based on the particle property "Molecule ID" you created - check how many atoms (and atom types) belong to each molecule. That way you can easily distinguish H2O2 and HO e.g.

If you're not comfortable with the python scripting interface yet, you could try to achieve the same by using the Compute property modifier. As an example, this will count the number of atoms within the neighborhood of a particle that share the same property Molecule ID as the central particle.
Expression: 0
NeighborExpression: @MoleculeID == MoleculeID

-Constanze


23
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: May 24, 2019, 02:25:45 PM »
Dear jaguarjom123,

you would need to develop your own custom python script modifier function for that. In principle you could use the example function I posted above and modify it such that it also assigns a property "Molecule type" based on the number of neighbors that are found for each atom.
Then, within your selection of molecules close to the nanoparticle, you could specfically look for certain molecule types.

-Constanze

24
Hi benjy,

you're right, unfortunately this is not documented yet. But when you use import_file(), you should be able to pass
Code: [Select]
rescale_reduced_coords = False
-Constanze

25
Hi benjy,

thank you for uploading the files. When you imported your files with the developer version,  did you deactivate the option "Detect reduced coordinates" in the XYZ-file reader?
Because it seems that this is what causes you problems. That still doesn't explain why ovito would assume that you have reduced coordinates and then scale the coordinates with the given lattice dimensions (x10 in your case) for only some frames as you say, so I will continue looking into this.

But as a quick fix for now, please deactivate the option "Detect reduced coordinates" in the XYZ File reader panel (see attached screenshots) and then use the "Reload data button". Then everything should be imported correctly.
Let me know if that doesn't work for you.

-Constanze

Edit: The explanation for this behavior is that the option "Detect reduced coordinates" will assume your data is in reduced format if all coordinates are within the [0,1] or [-0.5,+0.5]. Now in your very special case of only 3 particles, you have certain frames where that's true (e.g. in the frame in the screenshot).  So you will definitely need to deactivate that auto-detect option.


26
Hi benjy,
if you like you can upload some example frames of your trajectory here so I can look into this. Also it would be helpful to know what version of OVITO you’re using.
-Constanze

27
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: May 22, 2019, 04:50:51 PM »
Dear jaguarjom123,

I had a look at your structure you uploaded and the only information that you have in your data is the atom type and the positions - nothing more. That makes the analysis a little bit more complicated for you.

So in order to be able to calculate how many molecules are close to the surface of your Pt nanoparticle, you first need to teach ovito which atom belongs to which molecule. You could store that information in a particle property "Molecule ID" e.g..
The way to do this is to e.g. use the Create bonds modifier with an appropriate cutoff to identify particles that share a bond with other particles in conjunction with a Python script modifier. Below is an example of a custom python script modifier that checks which atoms are connected through bonds and assigns these groups a unique Molecule ID as particle property.
There is certainly more than one solution to do this, the following is just an example for you to know where to start:
Code: [Select]
from ovito.data import *
import numpy as np
def modify(frame, data):
   
    molecule_counter = 1
    molecule_ids = data.particles_.create_property("Molecule Identifier")
    bond_topology = data.particles.bonds.topology  # array with bond topology
   
    # Create bonds enumerator object.
    bonds_enum = BondsEnumerator(data.particles.bonds)

    # Loop over atoms.
    for particle_index in range(data.particles.count):
        # Loop over bonds of current atom.
        bond_pairs = [ (bond_topology[bond_index][0],bond_topology[bond_index][1]) for bond_index in bonds_enum.bonds_of_particle(particle_index)]
        if len(bond_pairs) != 0:
            neighbor_indices = np.unique(bond_pairs)
            if (np.all( [molecule_ids[i] for i in neighbor_indices]) == 0):
                    with molecule_ids:
                        molecule_ids[neighbor_indices] = molecule_counter
                    molecule_counter+=1
           

Then you could use the Select Type modifier (-> Particle Type 4) and after that the Expand selection with your desired cutoff value. This selects all atoms close to the surface of the sphere (and also inside, but you could delete these later if you don't want to look at them).
You should then apply another Expand selection modifier, this time with the option "bonded to a selected particle" (also increase number of iterations) to make sure you didn't only select half of a molecule with the previous modifier.
Now Invert and then delete the selection.
I attached the resulting picture in a screenshot.

-Constanze

28
Hi,

yes, have a look at the manual for the python scripting interface:
http://ovito.org/manual/python/introduction/file_io.html
or
http://ovito.org/manual_testing/python/introduction/file_io.html if your using the latest developer version.
In general, you would load your file(-sequence) and set up your pipeline by adding all the modifiers. Then, you can just
loop over all the frames of your loaded animation sequence like this:
Code: [Select]
# Load a sequence of simulation files 'frame0.dump', 'frame1000.dump', etc.
node = import_file("simulation*.dump")

# Set up data pipeline, apply modifiers as needed, e.g.
#node.modifiers.append(...)

for frame in range(node.source.num_frames):

    # This loads the input data for the current frame and
    # evaluates the applied modifiers:
    output = node.compute(frame)

    # Work with the computation results
    ...

-Constanze

29
Hi benjy,

I need to know exactly what you're doing during your analysis in order to be able to help you. Seems like your somehow manipulating the positions?

-Constanze

30
Hi,
yes, you can disable a modifier by setting its attribute "enabled" to False, see documentation

http://ovito.org/manual_testing/python/modules/ovito_pipeline.html#ovito.pipeline.Modifier


If you want to delete it altogether, you can use the standard python del operation.

-Constanze

Pages: [1] 2 3 ... 10