def test_change_atomgr_att_fail(self, inpxml_etree): from aiida_fleur.tools.xml_util import change_atomgr_att, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) change_atomgr_att(etree, attributedict=self.attdicts[0]) result = eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup[@species="Fe-1"]/' + self.paths[0]) assert result[0] == 'TTT'
def test_change_atomgr_att_all(inpxml_etree, attr_dict, correct_result, path): from aiida_fleur.tools.xml_util import change_atomgr_att, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) change_atomgr_att(etree, attributedict=attr_dict, species='all') result = eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup/' + path) assert result == correct_result
def change_atomgr_att1(fleurinp_tree_copy, attributedict, position=None, species=None, create=False): fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=position, species=species) return fleurinp_tree_copy