Closed rreho closed 1 year ago
Hi! How do you read the basis?
I would suggest you read the density matrix from the FDF file to avoid problems (if possible):
DM = sisl.get_sile("myfile.fdf").read_density_matrix()
I would suggest you read the density matrix from the FDF file to avoid problems (if possible):
DM = sisl.get_sile("myfile.fdf").read_density_matrix()
If we try this, we still get the error there is no orbital information.
Hi! How do you read the basis?
We read the basis like this:
pb_ion = sisl.io.siesta.ionxmlSileSiesta('Pb.ion.xml')
pb_atom =pb_ion.read_basis()
geom = sisl.get_sile('Pb.fdf').read_geometry()
geom_pb = sisl.Geometry([0,0,0], atoms = pb_atom)
geom.replace(np.arange(geom.na), geom_pb)
DM = sisl.get_sile('bulk-Pb.DM').read_density_matrix(geometry = geom)
Ok, Geometry.replace
returns a new geometry. So you should do:
geom = geom.replace(np.arange(geom.na), geom_pb)
But still, I don't know why it can not read the basis properly from the fdf file when you call sisl.get_sile("myfile.fdf").read_density_matrix()
(without any extra arguments). That's strange.
But I think even
geom = sisl.get_sile('Pb.fdf').read_geometry()
should get you the geometry with the correct basis if the basis files are there (in the same directory as the fdf file). Could you share the output of print(geom)
after this operation?
It turns out that the correct ion.xml files were missing from the directory. Now it works, thank you!
I was trying to compute the density on a grid by reading the information from a .DM file that was the output of a SIESTA calculation (including SOC) but I am running into issues. First the basis information was missing but even after manually supplying that by reading it from the ion file and attaching the proper geometry object I still get the following error:
Do you know a way to be able to do this?