MDIL-SNU / SIMPLE-NN

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)
GNU General Public License v3.0
47 stars 23 forks source link

TypeError: read_vasp_out() got an unexpected keyword argument 'force_consistent' #64

Closed sillycheng closed 5 years ago

sillycheng commented 5 years ago

This project is very helpful to me. But when I run the run.py script(I have installed tensorflow, mpi4py and run the setup.py), there is always show me this error,

WARNING:tensorflow:From C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn__init.py:86: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.inputs = deep_update(self.inputs, yaml.load(input_file), warn_new_key=True, Traceback (most recent call last): File "run.py", line 6, in model.run() File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn__init__.py", line 172, in run self.descriptor.generate() File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn\features\symmetry_function\init.py", line 507, in generate snapshots = io.read(tmp_name, index=index, format=self.inputs['refdata_format'], force_consistent=True) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 495, in read *kwargs)) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 556, in _iread for dct in io.read(fd, args, kwargs): File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 354, in wrap_read_function for atoms in read(filename, index, kwargs): File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\utils\init__.py", line 403, in iofunc obj = func(fd, *args, **kwargs) TypeError: read_vasp_out() got an unexpected keyword argument 'force_consistent'

I am not familiar with ase. And if i delete this option in the file"C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn\features\symmetry_function__init__.py", when I run this script again, it will show me another error :

WARNING:tensorflow:From C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn__init.py:86: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.inputs = deep_update(self.inputs, yaml.load(input_file), warn_new_key=True, Traceback (most recent call last): File "run.py", line 6, in model.run() File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn__init__.py", line 172, in run self.descriptor.generate() File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\simple_nn-0.9.0-py3.6-win-amd64.egg\simple_nn\features\symmetry_function__init__.py", line 507, in generate snapshots = io.read(tmp_name, index=index, format=self.inputs['refdata_format']) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 495, in read *kwargs)) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 556, in _iread for dct in io.read(fd, args, kwargs): File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\formats.py", line 354, in wrap_read_function for atoms in read(filename, index, kwargs): File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\utils\init.py", line 403, in iofunc obj = func(fd, *args, **kwargs) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\vasp.py", line 515, in read_vasp_out return list(g) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\utils.py", line 247, in call__ for chunk in self._getslice(fd, index): File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\vasp.py", line 477, in outcarchunks header_data = _read_outcar_header(fd) File "C:\Users\Administrator\Anaconda3\envs\tf\lib\site-packages\ase-3.18.0-py3.6.egg\ase\io\vasp.py", line 472, in _read_outcar_header raise IOError('Incomplete OUTCAR') OSError: Incomplete OUTCAR

How can I deal with these two problems?

JisuJung928 commented 5 years ago

Hello, sillycheng. We found that ase change read_vasp_out function in 3.18.0 update. In this update, force_consistent tag in read_vasp_out function is removed and that is the source of the first error. In the case of the second error, it might be originated from compress_outcar: true in input.yaml since the compressed version of OUTCAR is only available in ase<=3.17.0. Thus, both error can be solved for downgrading your ase module to version 3.17.0. Or, you can use compress_outcar: false in input.yaml with ase==3.18.0 instead of downgrading ase. If you still face the error after doing one of solution we suggest, please let me know and send the OUTCAR file if possible.

sillycheng commented 5 years ago

Hello, sillycheng. We found that ase change read_vasp_out function in 3.18.0 update. In this update, force_consistent tag in read_vasp_out function is removed and that is the source of the first error. In the case of the second error, it might be originated from compress_outcar: true in input.yaml since the compressed version of OUTCAR is only available in ase<=3.17.0. Thus, both error can be solved for downgrading your ase module to version 3.17.0. Or, you can use compress_outcar: false in input.yaml with ase==3.18.0 instead of downgrading ase. If you still face the error after doing one of solution we suggest, please let me know and send the OUTCAR file if possible.

Thank you, I downgraded my ase module to version 3.17.0, then run the example, it works.

vsumaria commented 5 years ago

Does the program only read OUTCAR files as input? All my structures with energy and forces are stored in traj files and ase is unavailable to write convert the traj files into OUTCAR.

Is there any way around this issue. Thanks

will1792 commented 5 years ago

@vsumaria I think SIMPLE-NN can handle other formats that ase can read without any problem. You just need to tell the format in the input.yaml via refdata_format option under symmetry_function. For example:

symmetry_function:
  refdata_format: traj
  (other options)

The default value for refdata_format is vasp-out. Refer https://wiki.fysik.dtu.dk/ase/ase/io/io.html for available file formats and their name.

vsumaria commented 5 years ago

That is amazing. I didn’t realize that was an option. Thanks !

On Sep 7, 2019, at 8:56 AM, Dongsun Yoo notifications@github.com wrote:

@vsumaria https://github.com/vsumaria I think SIMPLE-NN can handle other formats that ase can read without any problem. You just need to tell the format via refdata_format option under symmetry_function. For example:

symmetry_function: refdata_format: traj (other options) The default value for refdata_format is vasp-out. Refer https://wiki.fysik.dtu.dk/ase/ase/io/io.html https://wiki.fysik.dtu.dk/ase/ase/io/io.html for available file formats and their name.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MDIL-SNU/SIMPLE-NN/issues/64?email_source=notifications&email_token=AH6KLSOVJF3VJ4U25OWWGITQIPFLRA5CNFSM4IJEW3AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6E3WXY#issuecomment-529120095, or mute the thread https://github.com/notifications/unsubscribe-auth/AH6KLSKBNDNKSLQOBSWOPQDQIPFLRANCNFSM4IJEW3AA.