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 - benjy

Pages: [1]
1
Constanze,

Thank you so much! I never realized that was an option/issue, but now it is fixed. Is there a way to specify in a python script to ensure that it the reduced coordinate detection is turned off? I was looking through the manual and didnt see if you could specify that in a script via some line of code.

2
Constanze,

I've attached some of the frames in question. The version I'm using is version 3.0.0-dev349.

3
Constanze,

The analysis isn't the problem (probably shouldve just let that part out), its when I load the XYZ file into ovito and step through each frame of the file, I see the errors on certain frames like the one I mentioned in the original post. This is before doing any of the analysis (which in this case is just generating bonds).

4
Hi, so I've been working with a 3 particle system and doing some analysis, and noticed some discrepancies compared to other methods. When I checked the certain frames where these discrepancies occurred I noticed the positions of the particles were incorrect; for example, when I'm supposed to see:
Code: [Select]
AT1 -0.0458366307079032 0.487435423124703 0.388100731462943
 AT2 0.485326388695391 0.00895584052847351 -0.491597042508263
 AT3 -0.428006586535080 -0.492443496755789 0.0976308063157959

I end up seeing those positions multiplied by 10.
Code: [Select]
1 (AT1) -0.458366 4.87435 3.88101
2 (AT2) 4.85326 0.0895584 -4.91597
3 (AT3) -4.28007 -4.92443 0.976308

It has happened for other frames as well, and seemingly at random. Is there some way I can correct this? Don't know if this is relevant but the particle radii are set to 0, so there shouldnt be overlap, I think. The format of the xyz file is as follows:
Code: [Select]
3
cell_origin="-5.0 -5.0 -5.0", Lattice="10.0 0.0 0.0 0.0 10.0 0.0 0.0 0.0 10.0"
 C1 -0.0458366307079032 0.487435423124703 0.388100731462943
 C2 0.485326388695391 0.00895584052847351 -0.491597042508263
 C3 -0.428006586535080 -0.492443496755789 0.0976308063157959

5
Support Forum / Re: Error involving particles xyz positions at 0/
« on: April 17, 2019, 07:22:17 PM »
Constanze,

Thank you for the help. I've altered the my file to include the simulation cell lattice, but am having trouble to include the cell origin; ive tried specifying it as an additional parameter in the extended  file format or even in the Properties tab but it didn't quite seem to work... ultimately this doesn't matter for the visualization which is working just fine but is there a way for this to be done in the file format? I noticed there isn't a list of what you can specifically additionally in that line for extended xyz.

Regarding the script file i was running it from inside the Ovito GUI, i would choose the run python script option and load in my file and run it that way. It ran fine putting out data, it just output that error in the line afterwards for whatever reason. I haven't gotten around to modifying those script files but I'll let you know if the issue is resolved. I'm still very new to Python and scripting overall so I appreciate your help!

6
Support Forum / Error involving particles xyz positions at 0/
« on: April 11, 2019, 09:40:55 PM »
Hello, I'm currently having two problems.

First is regarding creating movies for some of my files, which are simple 3 atom simulations in the XYZ format, so I'm just passing in the atom type, and the xyz positions, and using the Affine Transformation to create a box around the particles for visualization purposes. For one of them, multiple atoms have a position that has an x, y, or z position at 0. At these frames the transformation gives an error, "Input simulation cell does not exist or is degenerate. Transformation to target cell would be singular." I'm not sure why its doing this.


I've also been running variations on a script for RDF calculation on the same XYZ files and it seems to run fine, however when it finishes the built in terminal gives this error: "Invalid Python script. It does not define the function named modify().". I've been having issues getting the results of the RDF script to agree with other sources, and was wondering if anyone could potentially have insight into what's going wrong. I've attached the python script in question.

7
Support Forum / Re: Calculating overall RDF via Python Script
« on: March 29, 2019, 09:36:14 PM »
Constanze,

Thank you so much for your assistance! I'm now able to generate global RDF for datasets, however I realized I need to specify periodic boundary conditions for the data sets. I know you can do it in the program on a frame by frame basis but is there a way to force it for each frame in the same Python script for RDF calculation? I'm trying to specify a box from -5 to 5 in the X, Y, and Z directions.

Thanks!

8
Support Forum / Calculating overall RDF via Python Script
« on: March 29, 2019, 04:46:32 PM »
Hi all!

I'm a new user to OVITO and have been trying to use it to calculate the overall RDF for a 3 atom simulation that has multiple "frames" (roughly 5000). Since the built in correlation function only looks at single frames I've been trying to build a script that gives the RDF for the entire simulation, using some of the templates on the website and forums as a basis.

So far I've got something that runs and seems to do the RDF calculations for each frame, considering how long it takes, but  the RDF file it outputs is incorrect when compared to what I've gotten from other programs/scripts. Any help on what I'm doing wrong would be greatly appreciated! I've copied the code below:


from ovito.data import *

def modify(frame, input, output):

from ovito.io import import_file
from ovito.modifiers import CoordinationNumberModifier
import numpy

# Load a particle dataset, apply modifier, and evaluate data pipeline.
node = import_file("C:/Python/pos_at.xyz", columns=["Particle Type", "Position.X", "Position.Y", "Position.Z"], multiple_frames = True)

modifier = CoordinationNumberModifier(cutoff = 2.5, number_of_bins = 1000)
node.modifiers.append(modifier)

frames = node.source.num_frames
print("The total number of frames are:",frames)

for frame in range(node.source.num_frames):
   output = node.compute(frame)

# Export the computed RDF data to a text file.
numpy.savetxt("C:/Users/Documents/ovito_dat/output_rdf_test.txt", modifier.rdf)

Pages: [1]