Protool/properties.py
def calculate_unit_cell_volume(PI):
    """calculate the volume of the unit cell"""
    cr=PI.cryst[0].split()
    a=float(cr[1])
    b=float(cr[2])
    c=float(cr[3])
    from math import *
    alpha=radians(float(cr[4]))
    beta=radians(float(cr[5]))
    gamma=radians(float(cr[6]))
    Vuc= a*b*c*sqrt(1.0-pow(cos(alpha),2)-pow(cos(beta),2)-pow(cos(gamma),2)+2.0*cos(alpha)*cos(beta)*cos(gamma))
    return Vuc
calculate the volume of the unit cell
calculate the volume of the unit cell
calculate the volume of the unit cell
def calculate_unit_cell_volume(PI):
    cr=PI.cryst[0].split()
    a=float(cr[1])
    b=float(cr[2])
    c=float(cr[3])
    from math import *
    alpha=radians(float(cr[4]))
    beta=radians(float(cr[5]))
    gamma=radians(float(cr[6]))
    Vuc= a*b*c*sqrt(1.0-pow(cos(alpha),2)-pow(cos(beta),2)-pow(cos(gamma),2)+2.0*cos(alpha)*cos(beta)*cos(gamma))
    return Vuc
def calculate_unit_cell_volume ( PI ) : cr = PI . cryst [ 0 ] . split ( ) a = float ( cr [ 1 ] ) b = float ( cr [ 2 ] ) c = float ( cr [ 3 ] ) from math import * alpha = radians ( float ( cr [ 4 ] ) ) beta = radians ( float ( cr [ 5 ] ) ) gamma = radians ( float ( cr [ 6 ] ) ) Vuc = a * b * c * sqrt ( 1.0 - pow ( cos ( alpha ) , 2 ) - pow ( cos ( beta ) , 2 ) - pow ( cos ( gamma ) , 2 ) + 2.0 * cos ( alpha ) * cos ( beta ) * cos ( gamma ) ) return Vuc
calculate the volume of the unit cell
calculate the volume of the unit cell
"""calculate the volume of the unit cell"""
PI