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

How to generate the force filed parameters by vasprun.xml? #20

Open
harrypotty18 opened this issue Nov 24, 2020 · 1 comment
Open

How to generate the force filed parameters by vasprun.xml? #20

harrypotty18 opened this issue Nov 24, 2020 · 1 comment

Comments

@harrypotty18
Copy link

Hi, When I went to calculate the force parameters in QuickFF 2.2.1 gave me an error with vasprun.xml file (version 5.3.5). The error reads:
" INIT Initializing system Traceback (most recent call last): File "/home/test/.conda/envs/quickff/bin/qff.py", line 38, in qff()
File "/home/test/.conda/envs/quickff/lib/python2.7/site-packages/quickff/scripts.py", line 360, in qff numbers, coords, energy, grad, hess, masses, rvecs, pbc = read_abinitio(fn)
File "/home/test/.conda/envs/quickff/lib/python2.7/site-packages/quickff/io.py", line 144, in read_abinitio vasprun = VASPRun(fn,field_labels=['hessian','gradient'])
File "/home/test/.conda/envs/quickff/lib/python2.7/site-packages/quickff/io.py", line 105, in init
self.fields['hessian'] = m3.reshape((-1,1))*self.fields['hessian']*m3 ValueError: operands could not be broadcast together with shapes (6,1) (2,2)".
Any suggestions on how to fix this issue would be appreciated. Thanks.

@camilofs
Copy link

Hello. I might be able to help. When you run the VASP calculations, set all of the atoms to update positions (T T T). The expected shape of the Hessian matrix should have the same form as the gradients (forces). For example, for three atoms:

  • grad.shape = [9] --> [3, 3], i.e. three atoms and three directions
  • hess.shape = [9, 9] --> [[3,3], [3,3]]

In case you want to study/model an isolated vibrational mode, you will have to use qff as a library and perform adjustments in the matrices by hand.

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