Giter Site home page Giter Site logo

imolpro's People

Contributors

klauspdoll avatar pjknowles avatar

Watchers

 avatar

imolpro's Issues

startup errors

Clean python environment installed as per INSTALL.

  1. Attempting to start a new project from command line:
python Molpro.py project1.molpro
Traceback (most recent call last):
  File "/host/Molpro.py", line 28, in <module>
    window_manager.register(ProjectWindow(arg))
                            ^^^^^^^^^^^^^^^^^^
TypeError: ProjectWindow.__init__() missing 1 required positional argument: 'window_manager'

Perhaps this is no longer supported? If not it would be good to trap that in a nicer way.

  1. Running with no arguments, select a directory for a new project and gave it a name:
python Molpro.py                
Traceback (most recent call last):
  File "/host/Chooser.py", line 152, in newProjectDialog
    self.window_manager.register(ProjectWindow(filename, self.window_manager))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/host/ProjectWindow.py", line 71, in __init__
    os.environ['PATH'] = os.popen(os.environ['SHELL'] + " -l -c 'echo $PATH'").read() + ':' + os.environ[
                                  ~~~~~~~~~~^^^^^^^^^
  File "<frozen os>", line 679, in __getitem__
KeyError: 'SHELL'
Aborted (core dumped)

Implement guided mode editing of input

  • This should probably be laid out as a tab set with the input window. Start by making a place-holder for it.

  • Convert input to structured specification for job, and inverse

  • Make buttons and selectors to allow editing of the specification

Implement project deletion from menu

This is tricky to do if the project is open, because if you remove the files, the open object continues to poll, and gets upset when the files are gone. Maybe it can be done from the Chooser

remove basis set line: crash

version 759d9d9

start with a new project, freehand input looks like this:

geometry=bla.xyz
basis=cc-pVTZ-PP
rhf

remove the line with basis=cc-pVTZ-PP starting from the end, until finally:

geometry=bla.xyz
b
rhf

remove the "b", crash:

Traceback (most recent call last):
  File "/home/linux24_i1/doll/imolpro/iMolpro/ProjectWindow.py", line 287, in refresh_input_tabs
    self.refresh_guided_pane()
  File "/home/linux24_i1/doll/imolpro/iMolpro/ProjectWindow.py", line 309, in refresh_guided_pane
    self.guided_basis_input.setText(self.input_specification['basis'])
                                    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'basis'
Aborted (core dumped)

(I noticed this when I tried to code setting the pulldown for the method, and ran into the same problem.)

Prevent orbital plots being polluted by their caption

'The orbital plots and the text above may overlap. Can the text be moved outside (above or below) the plot box?'

I have the impression that this might be difficult, as we are just taking what Jmol gives us. Related to #8 , or we might even want to offer the option to offload to external {Jmol,Avogadro} program for high resolution work, or preparing figures for presentation.

minor issue/TODO: take care of blanks

When a blank is added, this makes it in some cases impossible to switch to guided mode.

E.g.:

single blank in a line:

blank attached to command:
optg;

blank at beginning, in this case:

optg;
 freq;

strangely, this works:
optg; frequencies;
but not:
optg; freq;

warning upon startup or when inserting "a" before geometry=

python iMolpro.py

open a new project

type an "a" before geometry:

ageometry=dummy.xyz

iMolpro/molpro_input.py:75: FutureWarning: Possible nested set at position 4
  while (newline := re.sub('(\[[[0-9!]*),', r'\1!', line)) != line: line = newline  # protect eg occ=[3,1,1]

also seen, non-reproducible, immediately after startup:

iMolpro/molpro_input.py:75: SyntaxWarning: invalid escape sequence '\['
  while (newline := re.sub('(\[[[0-9!]*),', r'\1!', line)) != line: line = newline  # protect eg occ=[3,1,1]

Reverse-engineer guided mode information from input file

Several possible strategies:

  1. Don't try to do this, but instead stick with the gmolpro way of storing the guided mode information in the project, and making the input a slave, with all bets off if the input is hand-edited.
  2. Create special declare-only syntax for Molpro, a bit like Gaussian, that carries all the information
  3. Attempt to scrape any molpro input for the information - the last defined geometry and basis set, the last energy command if it can be found, optg, frequencies. Ideally should also have an intelligent input file comparator to test whether the new input that would be generated is logically equivalent to the old one, so that overwriting is allowed. A poor-man way of doing this is to just check whether the input is identical to that which would be generated from what has been scraped.

Note that there challenges associated with reverse-engineering the basis set. Easy to get hamiltonian from 'PP' in the basis. More tricky to get the basis quality level, maybe.

Make the display of orbital energies more helpful.

'Display the orbital energies in reverse order so that the occupied ones come on top. Otherwise one has to scroll down a very long list if the basis set is large. Alternatively, do not show virtuals (or only the lowest) by default.'

This might be tricky because we are just using what Jmol gives us. But let's consider what can be done.

linked geometry file names not used

When making a link of an xyz file to a different name (just for clarity, e.g. monomer.xyz -> c6h6.xyz) and selecting the link, the original name (monomer.xyz) is used in the input. It's of course not wrong. This happens for example if one has "monomer.xyz" in many different directories for different systems. Certainly not important to fix, unless simple.

creating new project from command line broken

Attempting to start a new project from command line, was recently fixed (see #32) so must be some recent regression:

host> python iMolpro.py project1.molpro
Traceback (most recent call last):
  File "/host/ProjectWindow.py", line 266, in refresh_input_tabs
    if len(self.input_tabs) < 1:
           ^^^^^^^^^^^^^^^
AttributeError: 'ProjectWindow' object has no attribute 'input_tabs'. Did you mean: 'input_pane'?
Aborted (core dumped)

Decide on a good name for this program

QtMolpro is perhaps not the best - nobody really cares that it's implemented with Qt. gmolpro is already taken. imolpro to emphasis interactive? xmolpro as a pointer towards X Window as used on linux?

creating new project from command line broken

Was previously broken and fixed, see #61, now broken again:

host> python iMolpro.py project1.molpro
Traceback (most recent call last):
  File "/host/iMolpro.py", line 28, in <module>
    window_manager.register(ProjectWindow(arg, window_manager))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/host/ProjectWindow.py", line 105, in __init__
    self.whole_of_procedures_registry = self.project.procedures_registry()
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Project' object has no attribute 'procedures_registry'

geometry window too small

At least on my machine the structure window is too small when displaying an input structure (see first screen shot). One has to extend it to the right to see also the link to the jmol options (second screen shot). This is a bit inconvenient. Also, the jmol option menu appears statistically in different places (submenus as well).

Bildschirmfoto 2023-10-09 um 12 26 22
Bildschirmfoto 2023-10-09 um 12 27 46

Remember recent directories

@hjwerner says 'It would be helpful if the program remembers (via some rc file) the last directories where (i) the project is stored, (ii) the geometry is read from, (iii) files are imported from; (iv) Files are exported to.'

Yes, I agree, and they can be stored in the settings.

problem with blank in basis={default=cc-pvdz }

Version be50a75

When I add a blank in this input

geometry={
o
h,o,1
}
basis={default=cc-pvdz}
rhf

in the line

basis={default=cc-pvdz }

before the closing bracket,
then switch to guided mode is not possible. Doing this change in guided mode gives the error message
"Guided mode cannot be used because the input is too complex..."

non-reproducible: invalid escape sequence '\*'

version 13c993e upon startup:

warning appears (sometimes, non reproducible):

python iMolpro.py
/klaus/path/miniconda3/envs/iMolpro/lib/python3.12/site-packages/pymolpro/project.py:492: SyntaxWarning: invalid escape sequence '\*'
  re.sub('([\*a-zA-Z0-9_-]+)=', '"\\1": ', li)).replace("'", '"') + '}'

It seems to happen always, when I do this:

touch /klaus/path/miniconda3/envs/iMolpro/lib/python3.12/site-packages/pymolpro/project.py
python iMolpro.py
/klaus/path/miniconda3/envs/iMolpro/lib/python3.12/site-packages/pymolpro/project.py:492: SyntaxWarning: invalid escape sequence '\*'
  re.sub('([\*a-zA-Z0-9_-]+)=', '"\\1": ', li)).replace("'", '"') + '}'

rhf22 is recognised as a method

version 759d9d9

start a new project:

geometry=bla2.xyz
basis=cc-pVTZ-PP
rhf

now edit:

rhf22 instead of rhf still allows to switch to guided mode, though rhf22 is not a molpro method. I can submit a calculation which crashes with:

Unknown command or directive RHF22

more for file menu

Add to files Menu:
delete/rename(move)/copy projects
Select previous run directory under a project

freehand mode: cursor jumps to upper left corner when typing

in freehand mode, starting from this input:

geometry=dummy.xyz
basis={default=cc-pVTZ-PP}
rhf

I want to append a line with

ccsd

While typing, the cursor often jumps to the upper left part of the window, which is inconvenient; e.g. usually after having typed the first "c" of ccsd, the cursor jumps to the upper left

describe prerequisites for running/developing directly from a git clone

At some point before this worked:

conda create -c conda-forge -n QtMolpro 'pymolpro>=1.3.32' pyqt=5 -y
conda activate QtMolpro

then I needed to add:

conda install -y -c conda-forge pyqtwebengine

and now it seems more is needed:

> python Molpro.py                
Traceback (most recent call last):
  File "/host/Molpro.py", line 4, in <module>
    from Chooser import Chooser
  File "/host/Chooser.py", line 17, in <module>
    from ProjectWindow import ProjectWindow
  File "/host/ProjectWindow.py", line 16, in <module>
    from database import database_choose_structure
  File "/host/database.py", line 4, in <module>
    import pubchempy
ModuleNotFoundError: No module named 'pubchempy'

It would be great if somewhere in the README or an INSTALL file there would be a concise list of what is needed from a fresh conda install to run and develop with the app.

Rename navigation to displays

'Replace „Structure display“ simply by „Display“ and have more items like „Structure, Orbitals, Density, Frequencies, ...“ in that pull-down menu?'

However the program does not know what is in the various output files, and in some cases the output file could have several instances of orbitals, geometries, frequencies etc. But let's consider what can be done to make it as friendly as possible.

Review layout of panes in ProjectWindow

          > Perhaps better to move the JMol menu stuff below the input window (right of freehand and guided, or below those). Currently the input window scales with the whole window size, which may not be needed.

Maybe, and it was once that way, but the way it is presently is dictated by the size needed for seeing the text output. Let's discuss in next meeting.

Originally posted by @pjknowles in #53 (comment)

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.