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

ad

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

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 ovito.io 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))
node.compute()

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

Can you please tell me more?

-ad

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 119
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?

-Constanze