cdsgroup / resp Goto Github PK
View Code? Open in Web Editor NEWA. Alenaizan's restricted electrostatic potential (RESP) plugin to Psi4
License: BSD 3-Clause "New" or "Revised" License
A. Alenaizan's restricted electrostatic potential (RESP) plugin to Psi4
License: BSD 3-Clause "New" or "Revised" License
Hello:
Started to use your resp code and would like to thank you here at this point.
May ask if it is possible to use more than two conformers for resp charge fitting?
I found in your code a "GRID input option" which might be the answer here but thought I would ask you.
Keep up the good work.
Best,
Markus
Dear cdsgroup,
I am using your resp package to derive the RESP charges, but error happened as shown below (by python -c "import resp, sys; sys.exit(resp.test('long'))"
):
E RuntimeError:
E Fatal Error: Timer DFH: initialize() is already on.
E Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1633639682895/work/psi4/src/psi4/libqt/timer.cc on line: 280
E The most recent 5 function calls were:
E
E psi::timer_on(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
E psi::DFHelper::initialize()
E psi::MemDFJK::preiterations()
The example cases cannot be run as well. The error messages are shown below:
RuntimeError:
Fatal Error: DFHelper:put_tensor: write error
Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1633639682895/work/psi4/src/psi4/lib3index/dfhelper.cc on line: 932
Could you help me out? I used both psi4=1.4.1 and psi4=1.5 to test.
Thank you so much,
Best,
Xiaobo
The current algorithm in stage2_helper._get_stage2_atoms
identifies all C-H groups as groups that should be refitted in the second stage. However, not all C-H atoms should be refitted, for example R≡C-H.
See http://www.psicode.org/psi4manual/master/_modules/psi4/driver/qcdb/parker.html, only
'C': 4,
'N': 3,
'O': 2,
'F': 1,
'P': 3,
'S': 2,
was allowed.
Bayly's 1993 article on RESP gives hyperbolic restrain as shown below (eq. 10). In resp/espfit.py
there is a function restraint
, which adds resp_a/np.sqrt(q[i]**2 + resp_b**2) * num_conformers
to unrestrained matrix. As far as I understand, it misses the multiplication on charge q[i]
, so the formula should be q[i]*resp_a/np.sqrt(q[i]**2 + resp_b**2) * num_conformers
to match one given in article. Could you, please, justify this: am I misunderstanding something or is there an error in code?
It appears that the conda
installation of resp
may be out of date. I tried installing psi4
and resp
into a new conda environment as follows:
conda create --name resp psi4 resp -c psi4
However, when I try to run the example in example1.py
, I get the following error:
Traceback (most recent call last):
File "example1.py", line 21, in <module>
charges1 = resp.resp([mol], options)
File "/Users/user/anaconda3/envs/resp-fail/lib/python3.7/site-packages/resp/driver.py", line 61, in resp
options = {k.upper(): v for k, v in sorted(options_list[0].items())}
KeyError: 0
Installing psi4
from conda and resp
from source works just fine.
Charge equivalencing for intra-molecular and inter-molecular constraints is enforced during the fitting procedure. It might be desired in some cases to do the charge fitting a posteriori by averaging the charges of equivalent atoms after the fit. Should implement this for both intra- and inter-molecular constraints and add options keyword argument to allow the user to choose the desired option.
Hi,
I ran this script for simple water molecule...
import psi4
from resp import resp
import numpy as np
mol = psi4.geometry('''
O 0.000000000000 -0.143225816552 0.000000000000
H 1.638036840407 1.136548822547 -0.000000000000
H -1.638036840407 1.136548822547 -0.000000000000
noreorient
units Bohr
''')
mol.update_geometry()
options = {'N_VDW_LAYERS' : 1,
'VDW_SCALE_FACTOR' : 1.0,
'VDW_POINT_DENSITY' : 1.0,
'CONSTRAINT_GROUP' : [[2,3]],
'BASIS_ESP' : '6-31g*' ,
}
Its a very simple problem and gives the following values...
Electrostatic Potential Charges
[-0.78908962 0.39454481 0.39454481]
Restrained Electrostatic Potential Charges
[-0.78639296 0.39319648 0.39319648]
All good! Out of interest I ran it for some other basis sets (I just list EPC - Restrained EPC similar)
STO-3 [-1.09155024 0.54577512 0.54577512]
aug-cc-pvdz [-0.63983113 0.31991557 0.31991557]
DZ [-1.08944916 0.54472458 0.54472458]
I don't expect the more minimal basis sets to perform the same as eg 6-31g* or aug-cc-pvdz but the lagrange multiplier algorithm is clearly converging to two minima. I know Slowquant on GH also has implemented a resp procedure and for an STO-3g example on water his results are...
Fitted Charges
Atom1 -0.70621766
Atom2 0.36056963
Atom3 0.34564803
Although his results are not directly comparable they are indicative. I have also implemented a resp program and get results (again not directly comparable)
[-0.75963876 0.37981938 0.37981938]
I'm a bit puzzled by this behaviour, which may be down to me misunderstanding how to set the options for your program. I would welcome your views.
Peter
By runing exmple1.py, Error raised.
Traceback (most recent call last): File "aa.py", line 21, in <module> charges1 = resp.resp([mol], options) File "/root/anaconda3/envs/psi/lib/python3.7/site-packages/resp/driver.py", line 61, in resp options = {k.upper(): v for k, v in sorted(options_list[0].items())} KeyError: 0
Hi,
I installed the RESP plugin but it doesn't work properly. Here are the install commands:
git clone https://github.com/cdsgroup/resp.git
cd resp
sudo python setup.py install
Then I run the test_resp.py but it doesn't give any output:
pc@pc~/Desktop/resp/resp/tests$ python test_resp.py
Am I doing something wrong?
Hope that you will help me.
Regards,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.