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

when install dpgen, succeeded, but the pymatgen path and version is unknown #1159

Closed
JTaozhang opened this issue Mar 18, 2023 · 3 comments
Closed

Comments

@JTaozhang
Copy link

(ZT-py39) [ZT@master ~]$ dpgen -h
DeepModeling

Version: 0.11.0
Path: /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/dpgen

Dependency

 numpy     1.23.5   /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/numpy
dpdata     0.2.13   /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/dpdata

pymatgen unknown version or path
monty 2022.9.9 /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/monty
ase 3.22.1 /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/ase
paramiko 3.0.0 /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/paramiko
custodian 2022.5.26 /public/home/ZT/.conda/envs/ZT-py39/lib/python3.9/site-packages/custodian

Moreover, when I run the small test of CH4 in the ini file, using command " dpgen init_bulk param.json", it report an
error
( File "/public/home/zhangtao/anaconda3/envs/ZT-py39/lib/python3.9/site-packages/pymatgen/core/structure.py", line 2518, in to
raise ValueError(f"Invalid format: {str(fmt)}")
ValueError: Invalid format: `ch4.poscar.01x01x01/00.place_ele/poscar )

, which has been discussed in this community before. According to the answer, it is the incompatibility problem of pymatgen. the developer also said he has fixed it(This error has been fixed by #1085 and #1126. Please update the code.). So I use command "pip install dpgen" reinstalled dpgen, and I still meet this problem and "pymatgen unknown version and path".

So, Whether the version of dpgen 0.11.0 has fixed this problem or there are some other problem also could acount for this?

@DM0815
Copy link

DM0815 commented Mar 28, 2023

gitclone -b devel dpgen(url)

@liu-stewart
Copy link

liu-stewart commented Mar 29, 2023

I suspect it is due to a version incompatibility issue. I have provided a temporary solution. You can see the code in the error prompt:

#minor bug for element symbol behind the coordinates
from_struct=Structure.from_file(from_file)
from_struct.make_supercell(super_cell)
from_struct.to('poscar', to_file)

but this method in pymatgen .core.structure line 2460, the parameters are :

def to(self, filename: str = "", fmt: str = "", **kwargs) -> str | None:

you can clearly observe that the fmt should be the second parameter, so you should change the

from_struct.to('poscar', to_file)

to

from_struct.to(to_file,'poscar')

@njzjz
Copy link
Member

njzjz commented Aug 30, 2023

0.11.1 has been released, which includes #1085 and #1126.

@njzjz njzjz closed this as completed Aug 30, 2023
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

4 participants