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.

Topics - benjy

Pages: [1]
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]
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

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.

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 import *

def modify(frame, input, output):

from 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/", columns=["Particle Type", "Position.X", "Position.Y", "Position.Z"], multiple_frames = True)

modifier = CoordinationNumberModifier(cutoff = 2.5, number_of_bins = 1000)

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]