Giter Site home page Giter Site logo

pymolpro's Introduction

Molpro python support

pymolpro is a Python library that provides support for working with the Molpro quantum chemistry package.

The principal feature is the Project class that provides access to a complete Molpro job, including input and output files together with metadata such as job status information. The project is stored as a bundle implemented as a directory in the file system. The class is a Python binding of the sjef library with additional Molpro-specific customisation, and the project bundle can be accessed also through a command-line interface and the gmolpro and iMolpro graphical user interfaces.

pymolpro is on conda forge and can be installed on most systems using conda install -c conda-forge pymolpro.

Documentation at https://molpro.github.io/pymolpro.

pymolpro's People

Contributors

pjknowles avatar msibaev avatar nick-wilson avatar

Stargazers

mizu-bai avatar  avatar Sissel avatar Qian Yang avatar Chrinide avatar Grant Hill avatar Yuji Ikeda avatar

Watchers

 avatar  avatar Grant Hill avatar

pymolpro's Issues

Implement database subsets

Probably should be done at the level of reactions, then work out which molecules are needed.

database.run(...,subset=['HF','H2','F2'],...)
database.run(..., subset='large',...)

database.add_subset('large',['HF','H2','F2'])

Provide Project.input()

Should provide the input from the input file, or from a specified run, or from the default run.

C++ exceptions not caught in opening bad project with pymolpro.Project()

import pymolpro
import pysjef
import os, shutil
pname = 'check_empty.molpro'
shutil.rmtree(pname)
os.mkdir(pname)
open(pname+'/Info.plist','w').write('')
try:
    p=pymolpro.Project(pname)
except:
    print("exception caught")

fails:

libc++abi: terminating due to uncaught exception of type sjef::runtime_error: error in loading /Users/sacpjk/current/PAPT/check_empty.molpro/Info.plist
No document element found

but is OK if pysjef.Project() is called instead.

Versioning of pymolpro messed up by Conda-forge

% conda list |grep pymolpro
# packages in environment at /opt/homebrew/Caskroom/miniforge/base/envs/pymolpro-conda:
pymolpro                  0.1.2              pyhd8ed1ab_0    conda-forge

% python -c 'import pymolpro; print(pymolpro.__version__)'
0+untagged.24.g0d6a9fc.dirty

Project.energies() does not always return all energies

from pymolpro import Project
p=Project("Neon")
p.write_input("""
geometry={Ne}
rhf
uccsd
""")
p.run()
print(p.out)
p.energies()

I can see that the expected output is printed. However, p.energies() contains only a single entry and it’s the rhf energy. I was expecting uccsd and rhf.

database.load() is not helpful if a bad database reference or content is provided

>>> pymolpro.database.load('junk')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Caskroom/miniconda/base/envs/pymolpro/lib/python3.10/site-packages/pymolpro/database.py", line 287, in load
    return Database().load(source)
  File "/usr/local/Caskroom/miniconda/base/envs/pymolpro/lib/python3.10/site-packages/pymolpro/database.py", line 208, in load
    __j = json.loads(source)
  File "/usr/local/Caskroom/miniconda/base/envs/pymolpro/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Caskroom/miniconda/base/envs/pymolpro/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Caskroom/miniconda/base/envs/pymolpro/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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.