Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return .in as an accepted geometry file type for generating force fields #177

Closed
LauriKurki opened this issue Jun 15, 2023 · 3 comments
Closed

Comments

@LauriKurki
Copy link
Collaborator

FHI-aims geometry input type *.in is no longer supported in e.g. ppafm-generate-ljff. Is it possible to add it back to the list of supported file types here? The function for reading that file type is still in the io.py file. Maybe @ondrejkrejci knows if it was removed on purpose or accidentally when the branches were merged.

ppafm/ppafm/io.py

Lines 357 to 388 in e12f67e

def loadGeometry(fname=None,params=None):
if(verbose>0): print("loadGeometry ", fname)
if fname == None:
raise ValueError("Please provide the name of the file with coordinates")
if params == None:
raise ValueError("Please provide the parameters dictionary here")
is_xyz = fname.lower().endswith(".xyz")
is_cube = fname.lower().endswith(".cube")
is_xsf = fname.lower().endswith(".xsf")
is_npy = fname.lower().endswith(".npy")
if(is_xyz):
xyzs, Zs, qs, comment = loadXYZ(fname)
nDim = params['gridN'].copy()
lvec = parseLvecASE(comment)
if lvec is None:
lvec = np.zeros((4,3))
lvec[ 1,: ] = params['gridA'].copy()
lvec[ 2,: ] = params['gridB'].copy()
lvec[ 3,: ] = params['gridC'].copy()
atoms = [list(Zs), list(xyzs[:, 0]), list(xyzs[:, 1]), list(xyzs[:, 2]), list(qs)]
elif(is_cube):
atoms = loadAtomsCUBE(fname)
lvec = loadCellCUBE(fname)
nDim = loadNCUBE(fname)
elif(is_xsf):
atoms, nDim, lvec = loadXSFGeom( fname)
elif(is_npy):
atoms, nDim, lvec = loadNPYGeom( fname) # under development
#TODO: introduce a function which reads the geometry from the .npy file
else:
sys.exit("ERROR!!! Unknown format of geometry system. Supported formats are: .xyz, .cube, .xsf \n\n")
return atoms,nDim,lvec

@mondracek
Copy link
Collaborator

Hi, I will do this soon as a part of solving issue #39.

@LauriKurki
Copy link
Collaborator Author

Okay, thanks! I missed the earlier discussion on this.

@mondracek
Copy link
Collaborator

It took some time but now, I believe, this issue has been resolved by #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants