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

Pages: [1]
1
Support Forum / Re: Calculating the area of Voronoi faces
« on: June 12, 2019, 05:54:46 PM »
Thanks you so much Alex.

2
Support Forum / Calculating the area of Voronoi faces
« on: June 12, 2019, 03:58:03 PM »
Hi all,

I need to calculate the surface area of Voronoi faces for all neighbors for every single atom. I was wondering whether I can use OVITOS.
Since VoronoiAnalysisModifier ignores any faces smaller than a threshold, it seems to me the algorithm calculates the surface area of each face. However, I am not sure how to dump these values.

Thanks
Leila

3
Support Forum / Re: issue with importing matplot and ovito
« on: November 20, 2018, 04:04:10 PM »
Thank you so much Alex.
You are right. The issue was pulling some libraries from Anaconda.

I removed all the LD_LIBRARY_PATH and PYTHON_PATH and installed all the packages I needed in the ovitos interpreter. It solved my problem :)

Thanks,
Leila

4
Support Forum / issue with importing matplot and ovito
« on: November 19, 2018, 05:27:19 PM »
Hi all,

I am trying to run a code using ovitos which has "import matplotlib.pyplot as plt" . However,  I get this error:

ImportError: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/leila/anaconda3/lib/python3.6/site-packages/matplotlib/../../../libpng16.so.16)

Then I tried to add "export LD_LIBRARY_PATH=/home/leila/anaconda3/lib:$LD_LIBRARY_PATH" to my bashrc. But this time,  I got this error:

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: minimal, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
Aborted

Thank you in advance,
Leila

5
Support Forum / Re: sort_particles
« on: October 21, 2018, 07:09:11 PM »
Thank you so much Alex.
It worked.

Regards,
Leila

6
Support Forum / sort_particles
« on: October 20, 2018, 11:18:38 PM »
Hi all,

I am using import_file (filename, sort_particles=True). However it is giving me this error:

node_1 = import_file (filename, sort_particles=True)
  File "/home/leila/Downloads/ovito-3.0.0-dev200-x86_64/bin/../lib/ovito/plugins/python/ovito/io/import_file.py", line 118, in import_file
    raise RuntimeError("Invalid keyword parameter. Object %s doesn't have a parameter named '%s'." % (repr(importer), key))
RuntimeError: Invalid keyword parameter. Object LAMMPSTextDumpImporter() doesn't have a parameter named 'sort_particles'.

I appreciate your help.

Regards,
Leila

7
Support Forum / Re: Problem with export_file
« on: June 14, 2018, 09:36:07 PM »
Dear Alex,

I got another error.
I am trying to calculate displacement of each atom with respect to previous step.  It is working well for small time steps. However, my simulation has 4*10^5 time steps and I dumped every 100 steps. SO in total I have 4000 dump file. It just prints out 505 files and then aborts with this error
RuntimeError: Could not detect the file format. The format might not be supported.
ERROR: The Python script 'samp.py' has exited with an error.

I was wondering whether I can print out all the displacements in 1 file? Now I am printing them in separate files.
My code is :

Code: [Select]
from ovito.io import import_file, export_file
from ovito.modifiers import PythonScriptModifier, CalculateDisplacementsModifier
import numpy
import os
import glob
import re
# Load input data and create an ObjectNode with a data pipeline.
path='/home/leila/Leila_sndhard/codes/gb_mobility_test/gb_mob/results_dE0.01/gb_ts100_T800/f.010/zdump'
node1 = import_file("/home/leila/Leila_sndhard/codes/gb_mobility_test/gb_mob/results_dE0.01/gb_ts100_T800/f.010/zdump/zdump.*.out", multiple_frames = True)
filenames = sorted(glob.glob('/home/leila/Leila_sndhard/codes/gb_mobility_test/gb_mob/results_dE0.01/gb_ts100_T800/f.010/zdump/zdump.*.out'))
def tryint(s):
    try:
        return int(s)
    except:
        return s

def alphanum_key(s):
    """ Turn a string into a list of string and number chunks.
        "z23a" -> ["z", 23, "a"]
    """
    return [ tryint(c) for c in re.split('([0-9]+)', s) ]

def sort_nicely(l):
    """ Sort the given list in the way that humans expect.
    """
    l.sort(key=alphanum_key)
sort_nicely(filenames)

n_f=node1.source.num_frames
print(n_f)
#print(filenames)
for i in range(n_f):
    node = import_file (filenames[i+1])

# Calculate per-particle displacements with respect to initial simulation frame:
    dmod = CalculateDisplacementsModifier()
    dmod.reference.load(filenames[i])
    node.modifiers.append(dmod)
    node.compute()
# Export calculated MSD value to a text file and let OVITO's data pipeline do the rest:
    export_file(node, "msd_data.%i.txt"%i,format = "xyz", columns = [ "Particle Identifier", "Particle Type", 'Displacement Magnitude'], frame=i)
Thanks in advance for your help,

Regards,
Leila

8
Support Forum / Re: Problem with export_file
« on: June 14, 2018, 08:55:16 PM »
Thank you so much Alex.
You are right. I was trying to export global attribute. It is working now :)

Regards,
Leila

9
Support Forum / Problem with export_file
« on: June 14, 2018, 04:21:03 PM »
Hi OVITO users,

I am very new to ovito. I tried to export the displacement magnitude of about 16000 atoms into txt file with this command:
export_file(node, "msd_data.%i.txt"%i,format = "txt", columns = ["Timestep", "MSD"], frame=i)

The problem is that it is just dumping 3 first and last numbers. For example:

# "Timestep" "MSD"
100 [ 0.2056347   0.39410666  0.37800705 ...,  0.33246541  0.34883693
  0.42290157]

I 'd appreciate your help.

Regards,
Leila

Pages: [1]