Skip to content

Commit

Permalink
Rename things
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Apr 10, 2024
1 parent 7a7aff5 commit 7bea13e
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions cubehandler/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def reduce_data_density(self, points_per_angstrom=2):
"""Reduces the data density"""
# We should have ~ 1 point per Bohr
slicer = np.round(
1.0 / (points_per_angstrom * np.linalg.norm(self.dv, axis=1))
1.0 / (points_per_angstrom * np.linalg.norm(self.dcell, axis=1))
).astype(int)
try:
self.data = self.data[:: slicer[0], :: slicer[1], :: slicer[2]]
Expand Down Expand Up @@ -297,32 +297,32 @@ def scaling_f(self):
return scaling_f

@property
def dV(self):
def dv(self):
"""in [ang]"""
return self.ase_atoms.get_volume() / self.data.size
return self.dv_ang

@property
def dV_ang(self):
def dv_ang(self):
"""in [ang]"""
return self.ase_atoms.get_volume() / self.data.size

@property
def dV_au(self):
def dv_au(self):
"""in [au]"""
return ANG_TO_BOHR**3 * self.ase_atoms.get_volume() / self.data.size
return ANG_TO_BOHR**3 * self.dv_ang

@property
def dv(self):
def dcell(self):
"""in [ang]"""
return self.cell / self.cell_n / ANG_TO_BOHR
return self.dcell_ang

@property
def dv_ang(self):
def dcell_ang(self):
"""in [ang]"""
return self.cell / self.cell_n / ANG_TO_BOHR
return self.dcell_au / ANG_TO_BOHR

@property
def dv_au(self):
def dcell_au(self):
"""in [au]"""
return self.cell / self.cell_n

Expand All @@ -331,26 +331,26 @@ def x_arr_au(self):
"""in [au]"""
return np.arange(
self.origin[0],
self.origin[0] + (self.cell_n[0] - 0.5) * self.dv_au[0, 0],
self.dv_au[0, 0],
self.origin[0] + (self.cell_n[0] - 0.5) * self.dcell_au[0, 0],
self.dcell_au[0, 0],
)

@property
def y_arr_au(self):
"""in [au]"""
return np.arange(
self.origin[1],
self.origin[1] + (self.cell_n[1] - 0.5) * self.dv_au[1, 1],
self.dv_au[1, 1],
self.origin[1] + (self.cell_n[1] - 0.5) * self.dcell_au[1, 1],
self.dcell_au[1, 1],
)

@property
def z_arr_au(self):
"""in [au]"""
return np.arange(
self.origin[2],
self.origin[2] + (self.cell_n[2] - 0.5) * self.dv_au[2, 2],
self.dv_au[2, 2],
self.origin[2] + (self.cell_n[2] - 0.5) * self.dcell_au[2, 2],
self.dcell_au[2, 2],
)

@property
Expand Down

0 comments on commit 7bea13e

Please sign in to comment.