Commit 00e0e69c authored by Marco Govoni's avatar Marco Govoni
Browse files

Added Aditya to the list of developers

parent 50165f75
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
## Developers ## Developers
- He Ma (University of Chicago) - He Ma (University of Chicago)
- Aditya Tanikanti (University of Chicago)
- Han Yang (University of Chicago) - Han Yang (University of Chicago)
- Huihuo Zheng (Argonne National Laboratory) - Huihuo Zheng (Argonne National Laboratory)
## Contributors
Aditya Tanikanti
\ No newline at end of file
...@@ -15,5 +15,6 @@ Developers ...@@ -15,5 +15,6 @@ Developers
---------- ----------
- He Ma (University of Chicago) - He Ma (University of Chicago)
- Aditya Tanikanti (University of Chicago)
- Han Yang (University of Chicago) - Han Yang (University of Chicago)
- Huihuo Zheng (Argonne National Laboratory) - Huihuo Zheng (Argonne National Laboratory)
...@@ -61,3 +61,11 @@ Electronic Structure ...@@ -61,3 +61,11 @@ Electronic Structure
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
Session
-------
.. automodule:: westpy.session
:members:
:undoc-members:
:show-inheritance:
...@@ -13,3 +13,4 @@ Contents: ...@@ -13,3 +13,4 @@ Contents:
tutorials/westpy_100.ipynb tutorials/westpy_100.ipynb
tutorials/westpy_101.ipynb tutorials/westpy_101.ipynb
tutorials/westpy_200.ipynb tutorials/westpy_200.ipynb
tutorials/westpy_300.ipynb
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<h1>RESTful Tutorials</h1> # 3.0 RESTful Tutorials
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We will show here how to interact with the remote server where the `pw.x`, `wstat.x` and `wfreq.x` are already installed. We will show here how to interact with the remote server where the `pw.x`, `wstat.x` and `wfreq.x` are already installed.
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We start by importing WESTPy and generating a ground state input file for methane. We start by importing WESTPy and generating a ground state input file for methane.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
from westpy import * from westpy import *
``` ```
%%%% Output: stream %%%% Output: stream
_ _ _____ _____ _____ _ _ _____ _____ _____
| | | | ___/ ___|_ _| | | | | ___/ ___|_ _|
| | | | |__ \ `--. | |_ __ _ _ | | | | |__ \ `--. | |_ __ _ _
| |/\| | __| `--. \ | | '_ \| | | | | |/\| | __| `--. \ | | '_ \| | | |
\ /\ / |___/\__/ / | | |_) | |_| | \ /\ / |___/\__/ / | | |_) | |_| |
\/ \/\____/\____/ \_/ .__/ \__, | \/ \/\____/\____/ \_/ .__/ \__, |
| | __/ | | | __/ |
|_| |___/ |_| |___/
WEST version : 3.1.1 WEST version : 3.1.1
Today : 2018-09-19 15:33:45.581889 Today : 2018-09-19 15:33:45.581889
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
geom = Geometry() geom = Geometry()
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
geom.setCell((25,0,0),(0,25,0),(0,0,25)) geom.setCell((25,0,0),(0,25,0),(0,0,25))
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
geom.addAtomsFromOnlineXYZ( "http://www.west-code.org/doc/training/methane/CH4.xyz" ) geom.addAtomsFromOnlineXYZ( "http://www.west-code.org/doc/training/methane/CH4.xyz" )
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
geom.addSpecies( "C", "http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf") geom.addSpecies( "C", "http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf")
geom.addSpecies( "H", "http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf") geom.addSpecies( "H", "http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf")
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
gs = GroundState(geom,xc="PBE",ecut=40.0) gs = GroundState(geom,xc="PBE",ecut=40.0)
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
gs.generateInputPW() gs.generateInputPW()
``` ```
%%%% Output: stream %%%% Output: stream
Generated file: pw.in Generated file: pw.in
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We now create a session on the remote server. We now create a session on the remote server.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
session = Session("your.email@domain.edu") session = Session("your.email@domain.edu")
``` ```
%%%% Output: stream %%%% Output: stream
Check the inbox/spam folder of your email and click on the link to activate the session Check the inbox/spam folder of your email and click on the link to activate the session
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
session.status() session.status()
``` ```
%%%% Output: execute_result %%%% Output: execute_result
{'Active': 'True', 'Time Left': '59 minutes'} {'Active': 'True', 'Time Left': '59 minutes'}
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
download = ["http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf","http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf"] download = ["http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf","http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf"]
pw_output = session.run("pw","pw.in","pw.out",download,3) pw_output = session.run("pw","pw.in","pw.out",download,3)
``` ```
%%%% Output: stream %%%% Output: stream
Requested to run executable pw on server imedevel.uchicago.edu Requested to run executable pw on server imedevel.uchicago.edu
Generated pw.out Generated pw.out
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We now generate the input for `wstat.x`. We now generate the input for `wstat.x`.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
data = {} data = {}
data["input_west"] = {} data["input_west"] = {}
data["input_west"]["qe_prefix"] = "calc" data["input_west"]["qe_prefix"] = "calc"
data["input_west"]["west_prefix"] = "calc" data["input_west"]["west_prefix"] = "calc"
data["input_west"]["outdir"] = "./" data["input_west"]["outdir"] = "./"
data["wstat_control"] = {} data["wstat_control"] = {}
data["wstat_control"]["wstat_calculation"] = "S" data["wstat_control"]["wstat_calculation"] = "S"
data["wstat_control"]["n_pdep_eigen"] = 5 data["wstat_control"]["n_pdep_eigen"] = 5
writeJsonFile("wstat.in",data) writeJsonFile("wstat.in",data)
``` ```
%%%% Output: stream %%%% Output: stream
File written : wstat.in File written : wstat.in
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
wstat_output = session.run("wstat","wstat.in","wstat.out",download,3) wstat_output = session.run("wstat","wstat.in","wstat.out",download,3)
``` ```
%%%% Output: stream %%%% Output: stream
Requested to run executable wstat on server imedevel.uchicago.edu Requested to run executable wstat on server imedevel.uchicago.edu
Generated wstat.out Generated wstat.out
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We now generate the input for `wfreq.x`. We now generate the input for `wfreq.x`.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
data["wfreq_control"] = {} data["wfreq_control"] = {}
data["wfreq_control"]["wfreq_calculation"] = "XWGQ" data["wfreq_control"]["wfreq_calculation"] = "XWGQ"
data["wfreq_control"]["n_pdep_eigen_to_use"] = 5 data["wfreq_control"]["n_pdep_eigen_to_use"] = 5
data["wfreq_control"]["qp_bandrange"] = [1,5] data["wfreq_control"]["qp_bandrange"] = [1,5]
data["wfreq_control"]["n_refreq"] = 300 data["wfreq_control"]["n_refreq"] = 300
data["wfreq_control"]["ecut_refreq"] = 2.0 data["wfreq_control"]["ecut_refreq"] = 2.0
writeJsonFile("wfreq.in",data) writeJsonFile("wfreq.in",data)
``` ```
%%%% Output: stream %%%% Output: stream
File written : wfreq.in File written : wfreq.in
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
wfreq_output = session.run("wfreq","wfreq.in","wfreq.out",download,3) wfreq_output = session.run("wfreq","wfreq.in","wfreq.out",download,3)
``` ```
%%%% Output: stream %%%% Output: stream
Requested to run executable wfreq on server imedevel.uchicago.edu Requested to run executable wfreq on server imedevel.uchicago.edu
Generated wfreq.out Generated wfreq.out
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
We now stop the session. We now stop the session.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
session.stop() session.stop()
``` ```
%%%% Output: execute_result %%%% Output: execute_result
{'Success': 'Session removed and cleared'} {'Success': 'Session removed and cleared'}
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
...@@ -6,7 +6,7 @@ class Session(object): ...@@ -6,7 +6,7 @@ class Session(object):
:Example: :Example:
>>> from westpy import * >>> from westpy import *
>>> session = Session("email@domain.com") >>> session = Session("your.email@domain.edu")
""" """
def __init__(self,emailId) : def __init__(self,emailId) :
...@@ -52,7 +52,7 @@ class Session(object): ...@@ -52,7 +52,7 @@ class Session(object):
:Example: :Example:
>>> from westpy import * >>> from westpy import *
>>> session = Session("email@domain.com") >>> session = Session("your.email@domain.edu")
>>> token = session.getToken() >>> token = session.getToken()
>>> print(token) >>> print(token)
...@@ -68,7 +68,7 @@ class Session(object): ...@@ -68,7 +68,7 @@ class Session(object):
:Example: :Example:
>>> from westpy import * >>> from westpy import *
>>> session = Session("email@domain.com") >>> session = Session("your.email@domain.edu")
>>> session.stop() >>> session.stop()
""" """
...@@ -89,9 +89,8 @@ class Session(object): ...@@ -89,9 +89,8 @@ class Session(object):
:Example: :Example:
>>> from westpy import * >>> from westpy import *
>>> session = Session("email@domain.com") >>> session = Session("your.email@domain.edu")
>>> status = session.status() >>> session.status()
>>> print(status)
""" """
...@@ -122,7 +121,7 @@ class Session(object): ...@@ -122,7 +121,7 @@ class Session(object):
:Example: :Example:
>>> from westpy import * >>> from westpy import *
>>> session = Session("email@domain.com") >>> session = Session("your.email@domain.edu")
>>> session.run( "pw", "pw.in", "pw.out", ["http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf"] , 2 ) >>> session.run( "pw", "pw.in", "pw.out", ["http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf"] , 2 )
>>> session.stop() >>> session.stop()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment