4
$\begingroup$

I am trying to implement a tether restraint in the MM region of my QM/MM calculation using pDynamo (CHARMM/ORCA interface). I need to define the origin as a Vector3. Does anyone know how to do this?

$\endgroup$
3
  • $\begingroup$ @CodyAldaz It is a maximum distance tether from a fixed point. I need to know how to define/format the vector 3. pDynamo does have this capability. $\endgroup$ Commented May 18, 2020 at 19:30
  • $\begingroup$ @CodyAldaz From what I can see in the code, yes. $\endgroup$ Commented May 18, 2020 at 19:40
  • $\begingroup$ @CodyAldaz check the SoftConstraints.py file in pMolecule $\endgroup$ Commented May 18, 2020 at 19:56

1 Answer 1

5
$\begingroup$

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!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .