You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pyscf
mol = pyscf.M(atom='''
C 0. 0. -0.542
O 0. 0. 0.677
H 0. 0.935 -1.082
H 0. -0.935 -1.082''',
basis='6-31g*', verbose=4)
mf = mol.RKS(xc='b3lyp').PCM()
mf.with_solvent.method = 'IEF-PCM' # C-PCM, SS(V)PE, COSMO
mf.with_solvent.eps = 78.3553 # for water
mf.run()
errors
Traceback (most recent call last):
File "/home/ljw/test/testpyscf.py", line 20, in <module>
mf = mol.RKS(xc='b3lyp').PCM()
File "/home/ljw/.conda/envs/pyscf/lib/python3.7/site-packages/pyscf/scf/hf.py", line 1740, in __getattr__
return object.__getattribute__(self, key)
AttributeError: 'RKS' object has no attribute 'PCM'
so I change mf = mol.RKS(xc='b3lyp').PCM() into mf = pyscf.solvent.PCM(mol.RKS(xc='b3lyp')) and get no errors
am I miss something or they are the same function
This is a bug in module import that was introduced by me in a PR of code cleanup. The .PCM() was register lazily when import the relevant solvent module. However, the automatic import code was removed accidentally. I will fix this problem in next release. For the moment, please use the second method mf = pyscf.solvent.PCM(mol.RKS(xc='b3lyp')) .
Activity
fishjojo commentedon Oct 13, 2024
@wxj6000 please take a look.
sunqm commentedon Oct 13, 2024
This is a bug in module import that was introduced by me in a PR of code cleanup. The .PCM() was register lazily when import the relevant solvent module. However, the automatic import code was removed accidentally. I will fix this problem in next release. For the moment, please use the second method
mf = pyscf.solvent.PCM(mol.RKS(xc='b3lyp')).