def get_density(self):
        """Compute the density from the output structure"""
        strc = self.get_output_structure()
        density = sum(strc.get_masses()) / strc.get_volume() * 1.660539040
        return Property(scalars=[Scalar(value=density)], units="g/(cm^3)")
def get_density ( self ) : strc = self . get_output_structure ( ) density = sum ( strc . get_masses ( ) ) / strc . get_volume ( ) * 1.660539040 return Property ( scalars = [ Scalar ( value = density ) ] , units = "g/(cm^3)" )
Compute the density from the output structure