Skip to main content
2 of 2
added 31 characters in body
Cody Aldaz
  • 8k
  • 1
  • 20
  • 76

In pdynamo 3.0.9

A vector3 can be defined by importing from Geometry module. For example,

center = Vector3.Null ( )

It looks like a vector3 is just 3 element vector. Not really sure but here is what I found in pScientific/Symmetry/PointGroupFinder.py file

You will need to get the center of mass however by looping over each atom in the geometry e.g.

$X_i = \displaystyle\sum_a^{N_a} m_a x_{ia}/M $

Which could be done in python like

np.sum([xyz[i,:]*atomic_masses[i]/M for i in range(self.natoms)],axis=0)

However, you are going to want to use an explicit for loop and loop over the coordinates3 of your geometry. Furthermore, you're gonna need the masses.

It looks like that's stored in system.atoms e.g. atom.mass

But that's a separate problem.

There may be a simple trick to do this but I'm not that familiar with pDynamo!

Cody Aldaz
  • 8k
  • 1
  • 20
  • 76