n = structure.store() print 'StructureData of elemental Pd obtained from Pd.cif has pk = {}\n'.format( str(n.pk)) # Add structure of Pd atom in AiiDA group g, _ = Group.get_or_create(name='Isolated_atoms') atoms = read('{}/Pd_isolated-atom.cif'.format(mypath)) structure = StructureData(ase=atoms) n = structure.store() g.add_nodes(n) print "Added structure (pk = {}) obtained from Pd_isolated-atom.cif to AiiDA group 'Isolated_atoms'\n".format( n.pk) # Store SinglefileData with Wien2k results for the equations of states f = SinglefileData() f.set_file('{}/WIEN2k.txt'.format(mypath)) f.store() print 'SinglefileData obtained from text file WIEN2k.txt has pk = {}\n'.format( str(f.pk)) # Store KpointsData for band structure k = KpointsData() k.set_kpoints_mesh([6, 6, 6], [0.0, 0.0, 0.0]) k.store() print 'KpointsData for band structure has pk = {}\n'.format(str(k.pk)) #from aiida.orm.data.singlefile import SinglefileData #try: # g = Group.get_or_create(name='pslib.0.3.1_PBE_PAW', type_string='UpfData') #except UniquenessError: # g = Group.get(name='pslib.0.3.1PBE_PAW', type_string='UpfData')
n = structure.store() print 'StructureData of elemental Pd obtained from Pd.cif has pk = {}\n'.format( str(n.pk)) # Add structure of Pd atom in AiiDA group g = Group.get_or_create(name='Isolated_atoms') atoms = read('{}/Pd_isolated-atom.cif'.format(mypath)) structure = StructureData(ase=atoms) n = structure.store() g.add_nodes(n) print "Added structure (pk = {}) obtained from Pd_isolated-atom.cif to AiiDA group 'Isolated_atoms'\n".format( n.pk) # Store SinglefileData with Wien2k results for the equations of states f = SinglefileData() f.set_file('{}/Wien2k.txt'.format(mypath)) f.store() print 'SinglefileData obtained from text file Wien2k.txt has pk = {}\n'.format( str(f.pk)) # Store KpointsData for band structure k = KpointsData() k.set_kpoints_mesh([6, 6, 6], [0.0, 0.0, 0.0]) k.store() print 'KpointsData for band structure has pk = {}\n'.format(str(k.pk)) #from aiida.orm.data.singlefile import SinglefileData #try: # g = Group.get_or_create(name='pslib.0.3.1_PBE_PAW', type_string='UpfData') #except UniquenessError: # g = Group.get(name='pslib.0.3.1PBE_PAW', type_string='UpfData')