Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speudos and phonon plotter #30

Merged
merged 5 commits into from
Aug 26, 2015
Merged

speudos and phonon plotter #30

merged 5 commits into from
Aug 26, 2015

Conversation

setten
Copy link
Member

@setten setten commented Aug 21, 2015

No description provided.

@@ -55,7 +55,7 @@ def write_dojo_report(self, report, overwrite_data=False):
old_report[dojo_trial][dojo_ecut] = report
try:
self.pseudo.write_dojo_report(old_report)
except (OSError, IOError, TypeError):
except None: #(OSError, IOError, TypeError):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use

try:

except:

if you want to trap all the possible exceptions.
In python3, one cannot use arbitrary objects wit except, only subclasses of BaseException are allowed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can revert it.

I only put the

except none

in when I'm debugging. I forgot to remove this one. It's the fastest way to
circumvent the except doning anything. Except None: literally does what it
says: it does not except anything and any raised exception causes the code
to stop.

Université catholique de Louvain
SST/IMCN - Institute of Condensed Matter and Nanosciences (IMCN)

Dr. Michiel J. van Setten

NAPS - Chemin des Étoiles 8 bte L7.03.01
1348 Louvain-la-Neuve (Belgium)
Email: michiel.vansetten@uclouvain.be mjvansetten@gmail.com

Telefon: +32 10 478681

2015-08-21 20:13 GMT+02:00 gmatteo notifications@github.com:

In pseudo_dojo/dojo/works.py
#30 (comment):

@@ -55,7 +55,7 @@ def write_dojo_report(self, report, overwrite_data=False):
old_report[dojo_trial][dojo_ecut] = report
try:
self.pseudo.write_dojo_report(old_report)

  •    except (OSError, IOError, TypeError):
    
  •    except None: #(OSError, IOError, TypeError):
    

Please use

try:

except:

if you want to trap all the possible exceptions.
In python3, one cannot use arbitrary objects wit except, only subclasses
of BaseException are allowed


Reply to this email directly or view it on GitHub
https://github.com/gmatteo/pseudo_dojo/pull/30/files#r37661866.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have a pull request open, there are some more commits added

Université catholique de Louvain
SST/IMCN - Institute of Condensed Matter and Nanosciences (IMCN)

Dr. Michiel J. van Setten

NAPS - Chemin des Étoiles 8 bte L7.03.01
1348 Louvain-la-Neuve (Belgium)
Email: michiel.vansetten@uclouvain.be mjvansetten@gmail.com

Telefon: +32 10 478681

2015-08-21 20:13 GMT+02:00 gmatteo notifications@github.com:

In pseudo_dojo/dojo/works.py
#30 (comment):

@@ -55,7 +55,7 @@ def write_dojo_report(self, report, overwrite_data=False):
old_report[dojo_trial][dojo_ecut] = report
try:
self.pseudo.write_dojo_report(old_report)

  •    except (OSError, IOError, TypeError):
    
  •    except None: #(OSError, IOError, TypeError):
    

Please use

try:

except:

if you want to trap all the possible exceptions.
In python3, one cannot use arbitrary objects wit except, only subclasses
of BaseException are allowed


Reply to this email directly or view it on GitHub
https://github.com/gmatteo/pseudo_dojo/pull/30/files#r37661866.

dojodata.py make_hints

adds hints to the psp8 based on the df prime, refactoring, debugging cleaning of the old validate

new validate under consruction...

pt plot of the ecut hints

ecut_hints added to the data frame.
still some work to do there, now both ecuts and ecuthints exist
gmatteo added a commit that referenced this pull request Aug 26, 2015
speudos and phonon plotter
@gmatteo gmatteo merged commit 1f23271 into abinit:master Aug 26, 2015
@setten
Copy link
Member Author

setten commented Aug 26, 2015

did you try the dojodata.py figures . ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 18:05, gmatteo wrote:

Merged #30.


Reply to this email directly or view it on GitHub.

@gmatteo
Copy link
Member

gmatteo commented Aug 26, 2015

→ ../scripts/dojodata.py figures ONCVPSP-PBE-MC2/
Traceback (most recent call last):
File "../scripts/dojodata.py", line 709, in
sys.exit(main())
File "../scripts/dojodata.py", line 692, in main
globals()"dojo_" + options.command
File "../scripts/dojodata.py", line 47, in dojo_figures
'low_ecut_hint', 'normal_ecut_hint', 'high_ecut_hint')}
File "../scripts/dojodata.py", line 44, in
l = {k: getattr(best, k) for k in ('name', 'Z', 'high_b0_GPa',
'high_b1', 'high_v0', 'high_dfact_meV',
File
"/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/core/generic.py",
line 2150, in getattr
(type(self).name, name))
AttributeError: 'Series' object has no attribute 'low_phonon'

On Wed, Aug 26, 2015 at 6:09 PM, Michiel van Setten <
notifications@github.com> wrote:

did you try the dojodata.py figures . ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 18:05, gmatteo wrote:

Merged #30.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#30 (comment).

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

@setten
Copy link
Member Author

setten commented Aug 26, 2015

did you also merge my pymatgen pull request ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 21:00, gmatteo wrote:

→ ../scripts/dojodata.py figures ONCVPSP-PBE-MC2/
Traceback (most recent call last):
File "../scripts/dojodata.py", line 709, in
sys.exit(main())
File "../scripts/dojodata.py", line 692, in main
globals()"dojo_" + options.command
File "../scripts/dojodata.py", line 47, in dojo_figures
'low_ecut_hint', 'normal_ecut_hint', 'high_ecut_hint')}
File "../scripts/dojodata.py", line 44, in
l = {k: getattr(best, k) for k in ('name', 'Z', 'high_b0_GPa',
'high_b1', 'high_v0', 'high_dfact_meV',
File
"/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/core/generic.py",
line 2150, in getattr
(type(self).name, name))
AttributeError: 'Series' object has no attribute 'low_phonon'

On Wed, Aug 26, 2015 at 6:09 PM, Michiel van Setten <
notifications@github.com> wrote:

did you try the dojodata.py figures . ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 18:05, gmatteo wrote:

Merged #30.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#30 (comment).

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

Reply to this email directly or view it on GitHub.

@gmatteo
Copy link
Member

gmatteo commented Aug 26, 2015

It works if I do

cd pseudo_dojo/pseudos/ONCVPSP-PBE && dojodata.py figures .

whereas

cd seudo_dojo/pseudos/ && dojodata.py figures ONCVPSP-PBE

fails because of

outfile = name+'/'+out

that is relative and not absolute (btw: os.path.join instead of "/")

btw: the plots are nice and very useful

On Wed, Aug 26, 2015 at 11:07 PM, Michiel van Setten <
notifications@github.com> wrote:

did you also merge my pymatgen pull request ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 21:00, gmatteo wrote:

→ ../scripts/dojodata.py figures ONCVPSP-PBE-MC2/
Traceback (most recent call last):
File "../scripts/dojodata.py", line 709, in
sys.exit(main())
File "../scripts/dojodata.py", line 692, in main
globals()"dojo_" + options.command
File "../scripts/dojodata.py", line 47, in dojo_figures
'low_ecut_hint', 'normal_ecut_hint', 'high_ecut_hint')}
File "../scripts/dojodata.py", line 44, in
l = {k: getattr(best, k) for k in ('name', 'Z', 'high_b0_GPa',
'high_b1', 'high_v0', 'high_dfact_meV',
File

"/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/core/generic.py",
line 2150, in getattr
(type(self).name, name))
AttributeError: 'Series' object has no attribute 'low_phonon'

On Wed, Aug 26, 2015 at 6:09 PM, Michiel van Setten <
notifications@github.com> wrote:

did you try the dojodata.py figures . ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 18:05, gmatteo wrote:

Merged #30.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
<#30 (comment)
.

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è
riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#30 (comment).

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

@setten
Copy link
Member Author

setten commented Aug 27, 2015

I'll fix that

I'm now working on different sortings. now we take the pseudo per element that has the lowest df, I'm adding options for the selecting based on the amount of valence electrons.

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 27 Aug 2015, at 00:08, gmatteo wrote:

It works if I do

cd pseudo_dojo/pseudos/ONCVPSP-PBE && dojodata.py figures .

whereas

cd seudo_dojo/pseudos/ && dojodata.py figures ONCVPSP-PBE

fails because of

outfile = name+'/'+out

that is relative and not absolute (btw: os.path.join instead of "/")

btw: the plots are nice and very useful

On Wed, Aug 26, 2015 at 11:07 PM, Michiel van Setten <
notifications@github.com> wrote:

did you also merge my pymatgen pull request ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 21:00, gmatteo wrote:

→ ../scripts/dojodata.py figures ONCVPSP-PBE-MC2/
Traceback (most recent call last):
File "../scripts/dojodata.py", line 709, in
sys.exit(main())
File "../scripts/dojodata.py", line 692, in main
globals()"dojo_" + options.command
File "../scripts/dojodata.py", line 47, in dojo_figures
'low_ecut_hint', 'normal_ecut_hint', 'high_ecut_hint')}
File "../scripts/dojodata.py", line 44, in
l = {k: getattr(best, k) for k in ('name', 'Z', 'high_b0_GPa',
'high_b1', 'high_v0', 'high_dfact_meV',
File

"/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/core/generic.py",
line 2150, in getattr
(type(self).name, name))
AttributeError: 'Series' object has no attribute 'low_phonon'

On Wed, Aug 26, 2015 at 6:09 PM, Michiel van Setten <
notifications@github.com> wrote:

did you try the dojodata.py figures . ?

Michiel van Setten
UCL, NAPS
mjvansetten@gmail.com
michiel.vansetten@uclouvain.be
010 478824

'"Although the way may not be obvious at first unless you're Dutch"
from The Zen of Python

On 26 Aug 2015, at 18:05, gmatteo wrote:

Merged #30.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
<#30 (comment)
.

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è
riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#30 (comment).

Nel 1969, con la potenza di calcolo di due Commodore 64, l'uomo è riuscito
a sbarcare sulla luna. Oggi, per far girare decentemente Windows Vista,
serve 1GB di RAM... qualcosa deve essere andato storto

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants