def get_feff_tags(self, calc_type): """ Reads standard parameters for XANES or EXAFS calculation from FeffInputSets.cfg file. Args: calc_type: at this time either 'XANES' or 'EXAFS' string is supported for K shell excitation. In the future this will be expanded to inlude other shells and material class differentiation. Returns: FeffTags object """ if calc_type.upper() == "XANES": fefftags = FeffTags(self.xanes_settings) elif calc_type.upper() == "EXAFS": fefftags = FeffTags(self.exafs_settings) else: raise ValueError("{} is not a valid calculation type" .format(calc_type)) return fefftags
def test_diff(self): filepath1 = os.path.join(test_dir, 'PARAMETERS') parameters1 = FeffTags.from_file(filepath1) filepath2 = os.path.join(test_dir, 'PARAMETERS.2') parameters2 = FeffTags.from_file(filepath2) self.assertEqual(FeffTags(parameters1).diff(parameters2), {'Different': {}, 'Same': {'CONTROL': [1, 1, 1, 1, 1, 1], 'MPSE': [2], 'OPCONS': '', 'SCF': [6.0, 0, 30, .2, 1], 'EXCHANGE': [0, 0.0, 0.0, 2], 'S02': [0.0], 'COREHOLE': 'Fsr', 'FMS': [8.5, 0], 'XANES': [3.7, 0.04, 0.1], 'EDGE': 'K', 'PRINT': [1, 0, 0, 0, 0, 0], 'LDOS': [-30., 15., .1]}})