You must have Xming server installed and running on a Windows computer
1) Download the latest version at http://li.mit.edu/A/Graphics/A/
2) Upload the file (usually A.*) to your bin folder using WinSCP or MobaXterm
3) Rename the file to atomeye (ie. ‘mv A.* atomeye’)
4) Enter chmod 755 atomeye
1) ‘~/bin/atomeye <filename>
Download Ovito and install on your machine (http://www.ovito.org/index.php/download)
1) Open Ovito and click ‘File’ then ‘Load remote file’
2) Enter the remote address (ie. ‘sftp://username@ip_address/home/<username>/<path>/<file>’)
Ovito is a power tool to visualize LAMMPS simulation result. The Python script modifier allows you to write your own modifier function and manipulate or analyze the simulation data in any way you want. This is useful in cases where the available standard modifiers of OVITO are not sufficient for your purposes. Also you can find scripting reference here.
Open Oviton add Python Script
modifier then write python script.
Example python script
from ovito.data import *
import numpy as np
def selected_particles_size(input):
position = input.particle_properties.position.array
x_min = min(position[:, 0])
x_max = max(position[:, 0])
y_min = min(position[:, 1])
y_max = max(position[:, 1])
z_min = min(position[:, 2])
z_max = max(position[:, 2])
return (x_max - x_min)*(y_max - y_min)*(z_max - z_min)
def modify(frame, input, output):
C2 = np.sum(input.particle_properties.coordination.array==2)
C3 = np.sum(input.particle_properties.coordination.array==3)
C4 = np.sum(input.particle_properties.coordination.array==4)
number_of_atoms = input.particle_properties.position.size
Na = 6.022*10**23
weight = 12/Na*number_of_atoms # unit g
density = weight/selected_particles_size(input)*10**24 #g/cc
print('C2', C2, '%.2f%%' % (C2/number_of_atoms*100))
print('C3', C3, '%.2f%%' % (C3/number_of_atoms*100))
print('C4', C4, '%.2f%%' % (C4/number_of_atoms*100))
print('atoms are not C2, C3 or C4:', -(C2+C3+C4-number_of_atoms))
print(('density: %.2f g/cc'% density))