def unit_cell_volume(self):
"""
Calculates unit cell volume of a given MOF object.
"""
a = self.uc_size[0]
b = self.uc_size[1]
c = self.uc_size[2]
alp = math.radians(self.uc_angle[0])
bet = math.radians(self.uc_angle[1])
gam = math.radians(self.uc_angle[2])
volume = 1 - math.cos(alp)**2 - math.cos(bet)**2 - math.cos(gam)**2
volume += 2 * math.cos(alp) * math.cos(bet) * math.cos(gam)
volume = a * b * c * math.sqrt(volume)
frac_volume = volume / (a * b * c)
self.ucv = volume
self.frac_ucv = frac_volume
评论列表
文章目录