def test_abinit_abifiles(): """ Test (pychemia.code.abinit) [abifiles] : """ from pychemia.code.abinit import AbiFiles filename = "tests/data/abinit_01/abinit.files" abf = AbiFiles(filename) assert abf.filename == "abinit.files" assert abf.get_input_filename() == 'tests/data/abinit_01/abinit.in'
def test_abinit_abifiles(): """ Tests (pychemia.code.abinit) [abifiles] : """ if pychemia.HAS_SCIPY and pychemia.HAS_SCIENTIFIC: from pychemia.code.abinit import AbiFiles filename = "pychemia/test/data/abinit_01/abinit.files" abf = AbiFiles(filename) assert abf.filename == "abinit.files" assert abf.get_input_filename() == 'pychemia/test/data/abinit_01/abinit.in'
def test_abinit_abifiles(): """ Tests (pychemia.code.abinit) [abifiles] : """ from pychemia.code.abinit import AbiFiles filename = "tests/data/abinit_01/abinit.files" abf = AbiFiles(filename) assert abf.filename == "abinit.files" assert abf.get_input_filename() == 'tests/data/abinit_01/abinit.in'
def test_abinit_input(): """ Test (pychemia.code.abinit) [input] : """ from pychemia.code.abinit import AbiFiles, AbinitInput filename = "tests/data/abinit_01/abinit.files" abf = AbiFiles(filename) inp = AbinitInput(abf.get_input_filename()) print(inp) print(len(inp)) assert len(inp) == 31 assert inp.get_value('ecut') == 10 assert len(inp.get_dtsets_keys()) == 12 assert inp.get_value('ntime', 41) == 10 assert inp.get_value('acell', 41)[0] == 14
def test_abinit_input(): """ Tests (pychemia.code.abinit) [input] : """ from pychemia.code.abinit import AbiFiles, AbinitInput filename = "tests/data/abinit_01/abinit.files" abf = AbiFiles(filename) inp = AbinitInput(abf.get_input_filename()) print(inp) print(len(inp)) assert len(inp) == 31 assert inp.get_value('ecut') == 10 assert len(inp.get_dtsets_keys()) == 12 assert inp.get_value('ntime', 41) == 10 assert inp.get_value('acell', 41)[0] == 14
if __name__ == '__main__': narg = len(sys.argv) - 1 list_abifile = [] list_idtset = [] dtsetall = False for i in range(narg): filename = sys.argv[i + 1] if ':' in filename: idtset = filename.split(':')[1] if idtset == 'all': dtsetall = True else: list_idtset.append(idtset) filename = filename.split(':')[0] abifile = AbiFiles(filename) if dtsetall: av = InputVariables(abifile.get_input_filename()) keys = av.get_dtsets_keys() for j in keys: list_abifile.append(abifile) list_idtset.append(str(j)) else: list_abifile.append(abifile) plot_bonds(list_abifile, list_idtset)
if __name__ == '__main__': narg = len(sys.argv) - 1 list_abifile = [] list_idtset = [] dtsetall = False for i in range(narg): filename = sys.argv[i + 1] if ':' in filename: idtset = filename.split(':')[1] if idtset == 'all': dtsetall = True else: list_idtset.append(idtset) filename = filename.split(':')[0] abifile = AbiFiles(filename) if dtsetall: av = AbinitInput(abifile.get_input_filename()) keys = av.get_dtsets_keys() # print(keys) for j in keys: list_abifile.append(abifile) list_idtset.append(str(j)) else: list_abifile.append(abifile) plot_bonds(list_abifile, list_idtset)