Ejemplo n.º 1
0
    def evaluate(self, symbols_and_values_in, symbol_out):

        tensor = ElasticTensor.from_voigt(symbols_and_values_in.get('E_ij'))

        if symbol_out == 'E':
            return tensor.y_mod

        return None
Ejemplo n.º 2
0
    def _evaluate(self, symbol_values):

        structure = symbol_values['structure']
        cij = symbol_values['C_ij']

        elastic_tensor = ElasticTensor.from_voigt(cij)

        debye_temp = elastic_tensor.debye_temperature(structure)

        return {'d': debye_temp}
Ejemplo n.º 3
0
def get_debye_temp(mpid):
    """
    Calculates the debye temperature from eleastic tensors on the Materials Project
    Credits: Joseph Montoya
    """
    pd.np.seterr(over="ignore") # ignore overflow in double scalars
    data = mpr.get_data(mpid)[0]
    struct = Structure.from_str(data['cif'], fmt='cif')
    c_ij = ElasticTensor.from_voigt(data['elasticity']['elastic_tensor'])
    td = c_ij.debye_temperature(struct)

    return td
Ejemplo n.º 4
0
    def evaluate(self,
                 symbols_and_values_in,
                 symbol_out):

        if symbol_out == 'Cij':

            tensor = ComplianceTensor.from_voigt(symbols_and_values_in.get('Sij'))
            return tensor.elastic_tensor.voigt

        elif symbol_out == 'Sij':

            tensor = ElasticTensor.from_voigt(symbols_and_values_in.get('Cij'))
            return tensor.compliance_tensor.voigt

        return None