Author Topic: Use bins to compute mass property  (Read 333 times)


  • Newbie
  • *
  • Posts: 25
Use bins to compute mass property
« on: November 12, 2018, 06:19:15 AM »

I have a binary bulk system, I wanted to compute the mass property at the core of the bulk cube and near edges (or excluding core) with the helming of bin. I am new and not much familiar with python script. Can you please help me to do that.
I was little understood for bining through the CA script

from import import_file
from ovito.modifiers import ClusterAnalysisModifier
import numpy

node = import_file("simulation.dump")
node.modifiers.append(ClusterAnalysisModifier(cutoff = 2.8, sort_by_size = True))

cluster_sizes = numpy.bincount(node.output.particle_properties['Cluster'].array)
numpy.savetxt("cluster_sizes.txt", cluster_sizes)

Can you please tell me more?


Constanze Kalcher

  • Administrator
  • Sr. Member
  • *****
  • Posts: 301
Re: Use bins to compute mass property
« Reply #1 on: November 13, 2018, 10:27:52 AM »
Hello ad,

I didn't understand yet what you are trying to do. Could you maybe explain a little bit more?