Protool/electrostatics.py
def calculate_center(self,atoms):
        """Calculate the geometric center of the atoms in atoms"""
        x=0.0
        y=0.0
        z=0.0
        for atom in atoms:
            x=x+self.atoms[atom]['X']/float(len(atoms))
            y=y+self.atoms[atom]['Y']/float(len(atoms))
            z=z+self.atoms[atom]['Z']/float(len(atoms))
        return numpy.array([x,y,z])
Calculate the geometric center of the atoms in atoms
Calculate the geometric center of the atoms in atoms
Calculate the geometric center of the atoms in atoms
def calculate_center(self,atoms):
        x=0.0
        y=0.0
        z=0.0
        for atom in atoms:
            x=x+self.atoms[atom]['X']/float(len(atoms))
            y=y+self.atoms[atom]['Y']/float(len(atoms))
            z=z+self.atoms[atom]['Z']/float(len(atoms))
        return numpy.array([x,y,z])
def calculate_center ( self , atoms ) : x = 0.0 y = 0.0 z = 0.0 for atom in atoms : x = x + self . atoms [ atom ] [ 'X' ] / float ( len ( atoms ) ) y = y + self . atoms [ atom ] [ 'Y' ] / float ( len ( atoms ) ) z = z + self . atoms [ atom ] [ 'Z' ] / float ( len ( atoms ) ) return numpy . array ( [ x , y , z ] )
Calculate the geometric center of the atoms in atoms
Calculate the geometric center of the atoms in atoms
"""Calculate the geometric center of the atoms in atoms"""
self
atoms