# Update 2

Published:

## Introduction

Phase 2 evaluations evalututions ended on July 26th, 2019. This post covers my work during the second phase.

## Pull Requests

Along with keyword unwrap, I also added keyword ‘compound’. The unwrap method requires the type of compound to unwrap the atoms. The ‘pbc’ keyword does not require the type of compound as it ends up shifting the atoms inside the unit cell. The unwrap method throws an error as all atoms are not bonded. Due to the addition of ‘compound’ keyword, center_of_mass returns center of each reside, molecule or molecule. For example the following code,


universe = mda.Universe(TRZ_psf, TRZ)
group = universe.residues[0:3]
group.center_of_mass(unwrap=True, compound="residues")


returns

np.array([[  76.23814219, -124.25513732,   39.80248593],
[ -10.50437721,   98.70438743,   23.90259186],
[ -53.37819853,   28.24250555,  -56.71862696]])


In order to use one center of mass, weighted average of each center of mass is used here.

• ASV benchmarks

One of the problems we faced while adding asv benchmarks, was how to handle functions which were not implemented in previous versions. I am currently trying to update setup so that it returns an NotImplementedError to skip these methods.

Tags: