Baijianlu / AICON2

AICON2: A program for calculating transport properties quickly and accurately
GNU General Public License v3.0
14 stars 12 forks source link

error:ImportError: cannot import name 'RELAX_MAX_FORCE' from 'atomate.vasp.config' ( #12

Open yjhao11 opened 5 months ago

yjhao11 commented 5 months ago

Dear all, when type python createelecworkflow.py, there are some errors.

Traceback (most recent call last): File "/home/hyj/soft/AICON2-master/examples/Electron/createelecworkflow.py", line 10, in from aicon.myworkflow import wf_electron_conductivity File "/home/hyj/soft/AICON2-master/examples/Electron/aicon/myworkflow.py", line 27, in from aicon.myfireworks import MyOptimizeFW, MyStaticFW, MyNonSCFFW, MyDFPTFW, \ File "/home/hyj/soft/AICON2-master/examples/Electron/aicon/myfireworks.py", line 23, in from atomate.vasp.config import HALF_KPOINTS_FIRST_RELAX, RELAX_MAX_FORCE, \ ImportError: cannot import name 'RELAX_MAX_FORCE' from 'atomate.vasp.config' (/home/hyj/soft/atomate/atomate_env/lib/python3.11/site-packages/atomate-1.1.0-py3.11.egg/atomate/vasp/config.py)

how to solve?Thank you very much!

Baijianlu commented 5 months ago

Hello,

This is perhaps due to the difference of version of atomate. In my version 1.0.2, I have this "RELAX_MAX_FORCE" variable in the atomate/vasp/config.py file. I think you need to find where is this variable (or the new name) and replace it in the AICON.

Regards,

Tao


From: yjhao11 @.***> Sent: 22 March 2024 06:11:27 To: Baijianlu/AICON2 Cc: Subscribed Subject: [Baijianlu/AICON2] error:ImportError: cannot import name 'RELAX_MAX_FORCE' from 'atomate.vasp.config' ( (Issue #12)

Dear all, when type python createelecworkflow.py, there are some errors.

Traceback (most recent call last): File "/home/hyj/soft/AICON2-master/examples/Electron/createelecworkflow.py", line 10, in from aicon.myworkflow import wf_electron_conductivity File "/home/hyj/soft/AICON2-master/examples/Electron/aicon/myworkflow.py", line 27, in from aicon.myfireworks import MyOptimizeFW, MyStaticFW, MyNonSCFFW, MyDFPTFW, File "/home/hyj/soft/AICON2-master/examples/Electron/aicon/myfireworks.py", line 23, in from atomate.vasp.config import HALF_KPOINTS_FIRST_RELAX, RELAX_MAX_FORCE, ImportError: cannot import name 'RELAX_MAX_FORCE' from 'atomate.vasp.config' (/home/hyj/soft/atomate/atomate_env/lib/python3.11/site-packages/atomate-1.1.0-py3.11.egg/atomate/vasp/config.py)

how to solve?Thank you very much!

— Reply to this email directly, view it on GitHubhttps://github.com/Baijianlu/AICON2/issues/12, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALVGKXJUQKVJJ7LQ5QQ7MITYZOON7AVCNFSM6AAAAABFCSSNASVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDCNRQG43DONA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

yjhao11 commented 5 months ago

Thank you for your answer! The latest version of atomate says :"Similarly, RELAX_MAX_FORCE, which was the default for max_force_threshold was removed from atomate.vasp.config.py and atomate.vasp.vasp_config.py." https://github.com/hackingmaterials/atomate/pull/778 How to solve it? Thank you very much!

Baijianlu commented 5 months ago

Hi,

Two options, you can either add one line in the atomate.vasp.config.py as

"RELAX_MAX_FORCE = 0.25", or you can replace every RELAX_MAX_FORCE in myfireworks.py as 0.25.

Regards,

Tao


From: yjhao11 @.***> Sent: 26 March 2024 11:03:55 To: Baijianlu/AICON2 Cc: Tao Fan; Comment Subject: Re: [Baijianlu/AICON2] error:ImportError: cannot import name 'RELAX_MAX_FORCE' from 'atomate.vasp.config' ( (Issue #12)

Thank you for your answer! The latest version of atomate says :"Similarly, RELAX_MAX_FORCE, which was the default for max_force_threshold was removed from atomate.vasp.config.py and atomate.vasp.vasp_config.py." hackingmaterials/atomate#778https://github.com/hackingmaterials/atomate/pull/778 How to solve it? Thank you very much!

— Reply to this email directly, view it on GitHubhttps://github.com/Baijianlu/AICON2/issues/12#issuecomment-2019755614, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALVGKXLFIWUTHIOIGDD7TNTY2ETWXAVCNFSM6AAAAABFCSSNASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJZG42TKNRRGQ. You are receiving this because you commented.Message ID: @.***>

yjhao11 commented 5 months ago

Thank you very much!