Coder Social home page Coder Social logo

semiempirical's Issues

Release version

Hello,

Please tag or make a release for this repository.
A tag or release let us distribute software in a reproductible manner.

Thanks

Errors when running Geometry optimizations

Hi there! I have been trying to perform geometry optimizations with the semiempirical approach and I have discovered that there is a misspelling in the following lines:

Class RMINDO3 line 175 from pyscf import semiemprical -> from pyscf import semiempirical
Class UMINDO3 line 253 from pyscf import semiemprical -> from pyscf import semiempirical

Once these two misspellings are corrected the geometry optimization is performed. I hope this error is corrected in the repo since
for the moment I need to clone the code, correct it myself in order to be able to use it. Thanks in advance.

'libsemiempirical' error when importing am1?

Hello,

I am new to trying PySCF, so I apologise if I did some stupid mistake. I installed the semiempirical plugin, and it seems to work. Except I cannot import the am1 module because the program fails at loading libsemiempirical. Any hint on what I should do to be able to use AM1? Thanks in advance!

Here's an example

In [1]: from pyscf.semiempirical import MINDO3

In [2]: from pyscf.semiempirical import am1
/home/dpadula/Data/software/anaconda3/envs/working/lib/python3.7/site-packages/pyscf/semiempirical/am1.py:24: UserWarning: AM1 model is under testing
  warnings.warn('AM1 model is under testing')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-5a7da9c66551> in <module>
----> 1 from pyscf.semiempirical import am1

~/Data/software/anaconda3/envs/working/lib/python3.7/site-packages/pyscf/semiempirical/am1.py in <module>
     24 warnings.warn('AM1 model is under testing')
     25 
---> 26 libsemiempirical = lib.load_library('libsemiempirical')
     27 ndpointer = numpy.ctypeslib.ndpointer
     28 libsemiempirical.MOPAC_rotate.argtypes = [

~/Data/software/anaconda3/envs/working/lib/python3.7/site-packages/pyscf/lib/misc.py in load_library(libname)
     52     try:
     53         _loaderpath = os.path.dirname(__file__)
---> 54         return numpy.ctypeslib.load_library(libname, _loaderpath)
     55     except OSError:
     56         from pyscf import __path__ as ext_modules

~/Data/software/anaconda3/envs/working/lib/python3.7/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
    151                     raise
    152         ## if no successful return in the libname_ext loop:
--> 153         raise OSError("no file with expected extension")
    154 
    155 

NameErrors when running RMINDO3 for Mac OS pyscf 2.0.1

Steps to reproduce

>>> import pyscf
>>> mol_h2o = pyscf.gto.M(atom = 'O 0 0 0; H 0 1 0; H 0 0 1', basis = 'ccpvdz')
>>> from pyscf.semiempirical import mindo3
>>> solver = mindo3.RMINDO3(mol_h2o)
>>> solver.run()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/lib/misc.py", line 512, in run
    self.kernel(*args)
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/lib/misc.py", line 631, in aliased_fn
    return getattr(self, fname)(*args, **kwargs)
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/scf/hf.py", line 1642, in scf
    self.dump_flags()
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/semiempirical/mindo3.py", line 173, in dump_flags
    log = logger.new_logger(mol, verbose)
NameError: name 'mol' is not defined

If you change mol in line 173 to self.mol or self._mindo_mol. I don't know which is correct, then it fails again at line 181

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/lib/misc.py", line 512, in run
    self.kernel(*args)
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/lib/misc.py", line 631, in aliased_fn
    return getattr(self, fname)(*args, **kwargs)
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/scf/hf.py", line 1642, in scf
    self.dump_flags()
  File "/Users/jamesbrown/Documents/Coding/environments/pyscftest/lib/python3.9/site-packages/pyscf/semiempirical/mindo3.py", line 181, in dump_flags
    return hf.RHF.dump_flags(self, log)
NameError: name 'hf' is not defined

Changing line 181
return hf.RHF.dump_flags(self, log) to return scf.hf.RHF.dump_flags(self, log) allows the calculation to finish.

converged SCF energy = -12.5424908345999
Heat of formation = -48.8262064549162 kcal/mol, -0.07780798779448 Eh
<pyscf.semiempirical.mindo3.RMINDO3 object at 0x10f6ffc40>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.