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 4 ... 10
31
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

32
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

33
Support Forum / Re: Particle count on multiple selected clusters
« on: May 17, 2019, 05:24:40 PM »
Hi shanis,

do I understand you correctly that you want to export all individual cluster ID's along with your custom property "Cluster size"?
In that case, if you have used numpy.bincount() to calculate the number of C-atoms in your different clusters
Code: [Select]
cluster_sizes = numpy.bincount( data.particles['Cluster'][ptype == C_type_id])
you already got the information you would like to export. "cluster_sizes" is an ndarray of length max(Cluster ID's) +1 that contains a bincount (i.e. the cluster sizes) of each
occuring Cluster ID. You could use numpy.where() to filter out clusters smaller or larger than a certain size
and then e.g. numpy.savetxt() to export this to a textfile.

-Constanze

34
Support Forum / Re: Particle count on multiple selected clusters
« on: May 17, 2019, 10:44:02 AM »
Hi shanis,

if you use the Expression selection modifier with the expression you posted above, you will select all carbon atoms that belong to clusters which contain more than 100 carbon atoms. You could then continue from there by counting the individual Cluster-ID's (i.e. the number of clusters) within that particle selection, e.g. using numpy.unique()

Code: [Select]
selection = data.particles['Selection']
cluster_ids = data.particles['Cluster']
cluster_count = len( numpy.unique( cluster_ids [ selection == 1] ))
data.attributes["My_cluster_count"] = cluster_count

For each frame, you could then store that information as a global attribute which in the end can be exported using the File export function "txt/attr", e.g.

Code: [Select]
export_file(pipeline, "cluster_count.txt", "txt/attr", multiple_frames = True,
         columns = ["Frame", "My_cluster_count"])

-Constanze

35
Support Forum / Re: WS analysis
« on: May 14, 2019, 11:32:54 AM »
Dear Karthik,

thanks for uploading the files for me, now I understand what's causing you problems. Note, that the Wigner Seitz defect analysis modifier has two output modes, i.e. the "sites" and "atoms" output modes.

In "sites" output mode, the modifier outputs the sites of the reference configuration together with their computed per-site occupancy numbers. Each site will be associated with a particle property named Occupancy, telling the number of atoms sitting on that site. This integer property subsequently allows you to identify vacancy and interstitial sites. It is important to realize that in this output mode, the displaced configuration gets completely replaced with the reference configuration after performing the WS algorithm.

In "atoms" output mode, in contrast, the modifier will output the atoms of the displaced configuration. Each atom will be assigned a property named Occupancy, now counting how many atoms in total are occupying the same site as the atom itself. Furthermore, the modifier will assign a property named Site Type, which tells for each atom the type of reference site it has been assigned to by the WS algorithm. This information allows to subsequently identify antisites, for example, by comparing the type of an atom to the type of its site. Finally, the algorithm assigns two additional properties named Site Index and Site Identifier to each atom, specifying the index and the unique identifier (if present) of the site to which the atom has been assigned. This information allows you to subsequently identify atoms which have left their original sites, for example. Note, however, that in "atoms" output mode you will not be able to identify vacancy sites, because only the physical atoms are retained. That's why you find 0 elements when you use the expression selection modifier with "Occupancy == 0".

Maybe it becomes more clear with an example: In your case, the Wigner Seitz defect analysis modifier calculated that you have 271 vacancies and 271 interstitials. You can double check that by using the Expression selection modifier:
If you select the output mode: "Sites" in the WS modifier, and then "Occupancy == 0" as expression selection you will get 271. However, to count the interstitials you need to pay attention to how many atoms occupy a site. As for your specific example "Occupancy > 1" selects 270 atoms. That's doesn't mean that there are only 270 interstitials. You have 269 sites with "Occupancy == 2" and 1 site with "Occupancy == 3". The latter site hosts 2 extra atoms, i.e. 269+2 = 271 interstitials.

Moreover, if you choose the "atoms" output mode you will get 2x269 = 538 sites that have a particle property Occupancy equal to 2, since in that mode the property "Occupancy" now tells you how many atoms share the same site as the atom itself. Consequently, for the one site that hosts 3 atoms, there are 3 atoms that fulfill "Occupancy == 3".

-Constanze


36
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: May 13, 2019, 11:47:23 AM »
Hi,

so do you still need to identify the molecules that formed (i.e. which atoms belong to which molecule), or do you have that information in your xyz file? If not, you probably first need to use the "Create bonds" modifier to
take care of that:
https://ovito.org/manual_testing/particles.modifiers.create_bonds.html
Then, you could select the atoms in the center and again use a bond-based criterion, or a Compute property modifier to count the molecules in the vicinity of your selected atoms.

In any case, I need to see the data to give you more specific input.
-Constanze

37
Support Forum / Re: WS analysis
« on: May 13, 2019, 11:36:18 AM »
Dear Karthik,
you can upload an example file for me here, if you want me to look into this further.

However, did you export the global attributes WignerSeitz.vacancy_count and WignerSeitz.interstitial_count? Note that the latter
counts the total number of excess atoms, summed over all sites of the reference configuration. A site with occupancy=2 has one excess atom. A site with occupancy=3 has two excess atoms, and so forth.
Is that maybe what causes your confusion?

-Constanze

38
Hi,
the attribute "ClusterAnalysis.cluster_count" gives you the total number of Clusters produced by the modifier. What you probably meant to do is select Clusters based on their Cluster-ID's. For that you should use the particle property "Cluster", e.g. use the Expression selection modifier with:
Code: [Select]
Cluster > 3and then delete these atoms to show only Clusters 1 to 3.

See also
http://www.ovito.org/manual_testing/python/modules/ovito_modifiers.html#ovito.modifiers.ClusterAnalysisModifier
Does that work for you?

-Constanze

39
Dear Dong,

your best chance is probably to get the NVIDIA driver running, but I'm afraid I cannot help you with that. Does the same problem appear with other programs, like VMD or Paraview?

-Constanze


40
Hello,

the current analysis tools of OVITO don't support more complicated structures like cementite yet. However, if you like you can upload an example file of your dislocation here so we can look into this further.

-Constanze

41
Support Forum / Re: Particle count on multiple selected clusters
« on: May 10, 2019, 12:24:28 PM »
Dear shanis,

in your above code snippet, you could create a selection based on the cluster ID's and then only loop over particles that have a particle property selection == 1.

Alternatively, you could simply use numpy.bincount() to calculate the number of C atoms in each cluster:
Code: [Select]
def particle_counting(frame, data):
    ptype = data.particles['Particle Type']
    C_type_id = type_property.get_type_by_name('C').id
    cluster_sizes = numpy.bincount( data.particles['Cluster'][ptype == C_type_id])
Since you initially sorted them by size you know which entry corresponds to which Cluster-ID.

Code: [Select]
    cluster_size_property = data.particles_.create_property("ClusterSize", dtype = int, components = 1)
    with cluster_size_property:
        for i in range(len(cluster_sizes)): #Or adapt to your needs...the first three clusters e.g. would be range(1,4)
            cluster_size_property[(ptype == C_type_id ) & ( data.particles['Cluster'] == i) ] = cluster_sizes[i]

-Constanze

42
Support Forum / Re: WS analysis
« on: May 10, 2019, 12:05:49 PM »
Dear Karthik,

sorry I don't understand yet what the issue is. Could you please elaborate the problem?

-Constanze

43
Dear shanis,

ah okay, sorry I somehow missed that you would like to get the individual cluster volumes instead. You're right, at the moment this is not possible yet by only applying the Surface mesh modifier once, but it is very likely a feature of the next release. So for now, you will have to use a little workaround, like you already suggested in your previous post, e.g. by looping over the Cluster-ID's and then applying the Surface mesh modifier to each individual cluster, e.g. :

Code: [Select]
   
...
clusterselect_modifier = SelectExpressionModifier()
pipeline.modifiers.append(clusterselect_modifier)
pipeline.modifiers.append(ConstructSurfaceModifier(only_selected = True))
for clusterID in range(1,6):
    my_expression = "Cluster == {}".format(clusterID)
    clusterselect_modifier.expression = my_expression
    data = pipeline.compute()
    print(pipeline.output.attributes['ConstructSurfaceMesh.solid_volume'])

-Constanze

44
Support Forum / Re: Visulaise the Molecule in dump xyz lammps file
« on: May 10, 2019, 11:23:26 AM »
Dear jaguarjom123,

no worries, I opened a new topic for you. In principle you can just click on "New Topic" on the Forum main page, and after if is approved by an admin it will be visible to the public.

It is a little difficult to help you without having detailed information on your system, so if you like you can upload an example file here in the forum using the "Attachements" function below the text-editor. That way I can have a look at your system and give you more specific advice.
But as a starting point: You said that your data includes molecule ID's. Note that you can use the Expression selection modifier to select molecules based on their ID's then and even delete all other atoms from the scene. Furthermore, you could calculate the center of mass of each molecule and e.g. use the Generate trajectory lines modifier to visualize their trajectories. You could also use a custom Python script modifier to calculate mean squared displacement etc.
Let me know if you have questions regarding any of those analyses.

-Constanze

45
Support Forum / Re: DisplacementMagnitude
« on: May 10, 2019, 10:54:35 AM »
Hello Icosta,

thanks for uploading the files. So the problem is that you didn't dump the atom ID's along with the positions etc. And unless you didn't specifically make sure that the atoms in the different snapshots are still sorted by their atom ID's there is no way you can calculate displacements in post-processing. Let me give you an example: Let's call the atom that is in the fifth line of the cfg file atom 5. If there is no particle property "Particle Identifier"-  OVITO then calculates the displacement vector of atom 5 by taking the reference position of the atom in the 5th line in the reference file. However, in your case it is very likely not the same particle. So you're really comparing positions of different particles that's why the displacements you calculated are so large.
So for the future, either dump the ID's or turn on sorting by atom ID's when dumping to avoid these problems.

-Constanze

46
Support Forum / Re: DisplacementMagnitude
« on: May 09, 2019, 07:37:07 PM »
Hello,

it seems that there is an issue with your input data. Can you upload the two cfg files here, e.g. the current file and the reference you used? Than I can look into this further tomorrow.

-Constanze

47
Support Forum / Re: DisplacementMagnitude
« on: May 09, 2019, 07:04:48 PM »
Hello,

please upload your screenshot here in the forum, using the "Attachments" function below the text editor.  The link you posted here shows a black image, so I can't see what you did.

-Constanze

48
Support Forum / Re: Problem of launching OVITO 2.9.0 on Centos 6.4
« on: May 06, 2019, 11:48:40 AM »
Hello,

please follow the instructions on the Download page under Note to users of RHEL and similar Linux distributions
http://www.ovito.org/index.php/download,
i.e. download and copy the two *.so files to the lib/ovito/ subdirectory of the OVITO installation. This should fix your error.

However, are you sure that your HPC supports remote 3D visualization? If that's not the case you should use
ovitos (which is OVITO's python scripting interface) instead of the graphical user interface.
See
http://www.ovito.org/manual/python/,
for more details.

-Constanze

49
Dear shanis,

in order to help you, I need to know what makes the five clusters you're trying to select different from the others? For example, if you wanted to get the 5 biggest clusters out of those 10 you could activate the option "Sort clusters by size"
https://www.ovito.org/manual_testing/particles.modifiers.cluster_analysis.html
and then create a selection based on their cluster ID's
Code: [Select]
clusterselect_modifier = SelectExpressionModifier(expression = 'Cluster <= 5')]Just let me know a little bit more about your system.

-Constanze

50
Support Forum / Re: Output position of dislocations using the DXA tool
« on: April 30, 2019, 09:49:54 AM »
Also, if you're familiar with the python scripting interface, you might find this code example useful:
http://www.ovito.org/manual_testing/python/modules/ovito_data.html#ovito.data.DislocationNetwork
In short, this is how you can access the individual dislocation segments of the dislocation network and print the coordinates of the vertex points.
Code: [Select]
data = node.compute()
for segment in data.dislocations.segments:
    print(segment.points)

-Constanze



51
Support Forum / Re: How to calculate the defect cluster.
« on: April 29, 2019, 03:05:19 PM »
Hello,

it is still not fully clear to me what you mean by "measuring the interstitial cluster". Also, please carefully read the description of the Wigner-Seitz defect analysis modifier in the manual:
https://ovito.org/manual_testing/particles.modifiers.wigner_seitz_analysis.html
In the "sites" mode, the modifier outputs the sites of the reference configuration together with their computed per-site occupancy numbers. In that case Occupancy == 1 means there is one atom sitting on that site,
so there is no interstitial atom, on the contrary, it is a regular lattice site. Interstitials are only present when you have an occupation number greater than 1.

As for the Cluster analysis: If you activate the option "Use only selected particles" you will restrict the clustering algorithm to your currently selected particles (in your case all single interstitial sites Occupancy == 2).
Unselected particles will be treated as if they do not exist and will be assigned the special cluster ID 0. So if you wanted to get clusters (defined by your cutoff) of that specific defect type, what you did there works.
https://www.ovito.org/manual_testing/particles.modifiers.cluster_analysis.html
Furthermore, in the above manual entry it is explained how to export the cluster sizes.

By the way, if you need to count the number of (specific) defects in the neighborhood of each defect (within a predefined cutoff range) and don't want to write a python script for that you could make use of the Compute property modifier.
https://ovito.org/manual_testing/particles.modifiers.compute_property.html
This modifier allows you to generate new particle properties and use selective and conditional property assignment, e.g.
    Expression:
        0
    Neighbor expression:
        @Occupancy == 2 && Occupancy == 2
    Cutoff Radius:
        3
will count the number of single interstitial sites in the neighborhood (cutoff = 3 Angström) of each interstitial site and store that in the particle property you defined in "Output property".
Let me know if you were asking for something different.

-Constanze



52
Support Forum / Re: Output position of dislocations using the DXA tool
« on: April 29, 2019, 02:05:19 PM »
Hello,

what you could do is export the dislocation lines in the *.ca file-format.
http://ovito.org/manual_testing/particles.modifiers.dislocation_analysis.html

In this file-format you'll find a section DISLOCATIONS that contains the number of dislocation lines extracted by the DXA, followed by the definition of each line.
Each dislocation line definition also contains the coordinates of the vertices that make up the dislocation line.

-Constanze

53
Support Forum / Re: How to calculate the number of H-Bonds
« on: April 29, 2019, 12:29:36 PM »
Dear Sahar,

I don't have a good understanding of your system yet, but it sounds like you could use the Create bonds modifier with pairwise cutoffs to first find all neighbors of each hydrogen atom within a cutoff of 3.5 Angström.
Then you could have a look at this topic, where it is discussed how to calculate bond angles. In principle you could write a custom python script modifier that calculates bond angles for all Donor-H-Acceptor pairs
http://forum.ovito.org/index.php?topic=265.msg2069#msg2069
and then create a selection for only those pairs that fulfill your bond angle criterion.

-Constanze

54
Dear zahid,

just so I understand correctly: You would like to count how many atoms have displacement vectors larger than 0.75 Å with respect to your reference state?
Then you would first add a Displacement vector modifier to your pipeline and load the reference state of your choice.
You will see that each particle now has a particle property "Displacement Magnitude" which is the length of the corresponding displacement vector.
In a next step, you can insert an Expression selection modifier at the top of your pipeline and create a selection based on the displacement, e.g.
Code: [Select]
DisplacementMagnitude > 0.75 . You will then see the number of selected atoms below the Expression editor field. It will also appear as Global Attribute under "SelectExpression.num_selected". That means you can export that
information (even the time-series) as a text-file using the built-in file-export function.

-Constanze

55
Hi,

with the help of the Voronoi analysis modifier you can compute the Voronoi indices of the Voronoi cell of each atom, which are stored as individual particle property.
http://ovito.org/manual/particles.modifiers.voronoi_analysis.html
Analogous to the procedure in the GUI, in a python script you would simply add the Voronoi analysis modifier to your pipeline and set the option "compute_indices=True".
http://ovito.org/manual/python/modules/ovito_modifiers.html#ovito.modifiers.VoronoiAnalysisModifier

Also, there is a ready-to-use code example in the manual which shows you how to calculate the distribution of Voronoi polyhedra in your metallic glass:
http://ovito.org/manual/python/introduction/examples.html

In order to distinguish between different particle types of the center atoms of each coordination polyhedron you can e.g. create a selection based on their particle type.

-Constanze

56
Support Forum / Re: Error involving particles xyz positions at 0/
« on: April 25, 2019, 01:49:59 PM »
Hello benjy,

ovito should accept the following argument in the header of your xyz file:
Code: [Select]
cell_origin="-5.0 -5.0 -5.0"
-Constanze


57
Dear Dong,

I assume it has something to do with the graphics card driver you're using. Depending on the number of atoms OVITO switches between different rendering modes, that's why you only get this error in some cases. According to your error message the software renderer swrast fails. It seems like you haven't installed the correct graphics driver for your hardware?
Could you please check that and let me know if that fixes your problem.

-Constanze

58
Support Forum / Re: DXA analyze only selected particles
« on: April 24, 2019, 05:35:03 PM »
Dear Ray,

yes, if you're using the developer version, the DXA modifier has an attribute "only_selected".
http://www.ovito.org/manual_testing/python/modules/ovito_modifiers.html#ovito.modifiers.DislocationAnalysisModifier

Code: [Select]
modifier = DislocationAnalysisModifier()
modifier.only_selected = True

-Constanze

59
Hello,

thanks for letting us know. However, I have difficulties reproducing the error. I can open your file without any trouble with both OVITO 2.9 and the latest developer version. Can you tell us what Ubuntu version you are using?
Also, does this happen with any file?

-Constanze

60
Support Forum / Re: How to calculate the defect cluster.
« on: April 23, 2019, 10:47:38 AM »
Hello,

can you explain what you would like to analyze specifically?

-Constanze

Pages: 1 [2] 3 4 ... 10