Skip to content

Commit

Permalink
Merge pull request #10 from MDIL-SNU/python3
Browse files Browse the repository at this point in the history
Python3
  • Loading branch information
yybbyb committed Feb 17, 2020
2 parents aef4684 + 70b00b6 commit 99e1a91
Show file tree
Hide file tree
Showing 93 changed files with 1,298 additions and 771 deletions.
19 changes: 10 additions & 9 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,21 @@ Brief description of each file:
# Installation #
##############################################

AMP2 is written in Python 2.7. Currently, the
package is not compatible with lower or higher
version than 2.7. AMP2 is utilizes Python modules
in the following with link to each site.
AMP2 supprots Python 2.7 and 3. Currently, the
package is not compatible with lower version
than 2.7. AMP2 is utilizes Python modules in
the following with link to each site.
- numpy [https://www.numpy.org]
- scipy [https://www.scipy.org]
- spglib [https://atztogo.github.io/spglib]
- PyYAML [https://pypi.org/project/PyYAML]
These modules should be pre-installed. In addition,
AMP2 needs gnuplot to draw various figures.

##############################################
# Basic setup #
##############################################

As we mentioned, AMP2 was written in Python 2.7.
Thus, to use AMP2, you should set to execute Python
2.7 from 'python' command.
----------------------------------------------
AMP2 uses YAML style configuration file. All
setting parameters used in AMP2 can be controlled
in 'config.yaml'. Before using AMP2, proper pathes
Expand Down Expand Up @@ -128,8 +125,12 @@ python [src_path]/main.py [path for configuration file] [path for nodefile] [the

- [src_path] is the path for directory of source codes for AMP2.
- [path for configuration file] is the path for configuration file (config.yaml).
- [path for nodefile] is used to record the information of computing nodes.
- [path for nodefile] is used to record the information of computing nodes such as
PBS_nodefile in Portable Batch System {PBS} and HOSTNAME in Sun Grid Engine (SGE).
In the PBS system, we recommand to use the command, "echo $PBS_nodefile > nodefile".
Also, users can save an arbitrary text by writing in the nodefile.
- [the number of cores] is the number of cores to be used in parallel computing.

For the convenience, we provide the shell script file (run.sh) as following.

================= run.sh ===================
Expand Down
Binary file modified docs/.DS_Store
Binary file not shown.
56 changes: 55 additions & 1 deletion docs/Input/Advanced_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,58 @@ config_def.yaml:
- hole
- electron
temperature_for_fermi: 300 # The temperature to estimate the Fermi distribution
fermi_for_cutoff: 0.99 # Boundary condition for valid Fermi distribution (1-f)
fermi_for_cutoff: 0.99 # Boundary condition for valid Fermi distribution (1-f)

To get more accurate band gap
-----------------------------

We suggest two approaches to get more accurate band gap.

- Band calculation with hybrid functional

In the basic version, the band calculation is performed using PBE scheme.
However, users can add the tags below to use hybrid functional for structure
optimization and band calculation.
::
relaxation:
potential_type:
- HSE
band_calculation:
potential_type:
- HSE

- Using HSE@PBE scheme with hybrid structure

Second approach is still using HSE@PBE method but the optimized structure is
calculated using hybrid functional. Since the band calculation with hybrid functional
is too expensive, the k-points corresponding to the VBM and CBM are determined by using
GGA method. For this calculation, users can use the commands below. Here, if potential_type
in hybrid_oneshot is the main category, the method tags (HSE and GGA) are child subcategory
not parent subcategory. Please be careful.
::
relaxation:
potential_type:
- GGA
- HSE
hybrid_oneshot:
potential_type:
- - HSE
- GGA

Organic crystal
---------------
Organic crystals usually have lower Young's modulus than inorganic materials.
Thus, the error in the structural parameters can be substantial and they require
high precision for calculation. The tags below can control the precision of calculation.
::
cif2vasp:
INCAR:
EDIFF: 1e-08

convergence_test:
enconv: 0.001
prconv: 1

relaxation:
pressure: 1
force: 0.002
13 changes: 13 additions & 0 deletions docs/Input/Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,16 @@ The details are explained in the paper.
carrier_type:
- hole
- electron

- temperature_for_fermi:
It controls the temperature to estimate the hole or electron distribution
based on the Fermi-Dirac function.

Usage:
::
effective_mass:
temperature_for_fermi: [real]
Default:
::
effective_mass:
temperature_for_fermi: 300
8 changes: 4 additions & 4 deletions docs/Installation/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ You can execute AMP\ :sup:`2`\ using Python command as following.
- [src_path] is the path for directory of source codes for AMP\ :sup:`2`\.
- [path for configuration file] is the path for configuration file (config.yaml).
- [path for nodefile] is used to record the information of computing nodes such as PBS_nodefile in
Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
the command, "echo $PBS_nodefile > nodefile". Also, users can save an arbitrary text
by writing in the nodefile.
Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
the command, "echo $PBS_nodefile > nodefile". Also, users can save an arbitrary text
by writing in the nodefile.
- [the number of cores] is the number of cores to be used in parallel computing.

For the convenience, we provide the shell script file (run.sh) as following.
Expand All @@ -88,4 +88,4 @@ Then, you can execute AMP\ :sup:`2`\ using shell script as following.
sh run.sh

The shell script file can be easily integrated with job scheduler program such
as PBS.
as PBS.
Binary file modified docs/_build/.DS_Store
Binary file not shown.
Binary file modified docs/_build/doctrees/Examples/Examples.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Input/Advanced_configuration.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Input/Configuration.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Input/Input.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Input/Input_files.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/Input_and_Output/Input_and_Output.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Installation/Installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Output/Output.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/Overview/Overview.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/conf.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/share.doctree
Binary file not shown.
62 changes: 61 additions & 1 deletion docs/_build/html/Input/Advanced_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
<li class="toctree-l1 current"><a class="reference internal" href="Input.html">Input</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="Input_files.html">Input files</a></li>
<li class="toctree-l2"><a class="reference internal" href="Configuration.html">Configuration</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Advanced configuration</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Advanced configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#to-get-more-accurate-band-gap">To get more accurate band gap</a></li>
<li class="toctree-l3"><a class="reference internal" href="#organic-crystal">Organic crystal</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Output/Output.html">Output</a></li>
Expand Down Expand Up @@ -267,6 +271,62 @@ <h1>Advanced configuration<a class="headerlink" href="#advanced-configuration" t
<span class="n">fermi_for_cutoff</span><span class="p">:</span> <span class="mf">0.99</span> <span class="c1"># Boundary condition for valid Fermi distribution (1-f)</span>
</pre></div>
</div>
<div class="section" id="to-get-more-accurate-band-gap">
<h2>To get more accurate band gap<a class="headerlink" href="#to-get-more-accurate-band-gap" title="Permalink to this headline"></a></h2>
<p>We suggest two approaches to get more accurate band gap.</p>
<ul>
<li><p>Band calculation with hybrid functional</p>
<p>In the basic version, the band calculation is performed using PBE scheme.
However, users can add the tags below to use hybrid functional for structure
optimization and band calculation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">relaxation</span><span class="p">:</span>
<span class="n">potential_type</span><span class="p">:</span>
<span class="o">-</span> <span class="n">HSE</span>
<span class="n">band_calculation</span><span class="p">:</span>
<span class="n">potential_type</span><span class="p">:</span>
<span class="o">-</span> <span class="n">HSE</span>
</pre></div>
</div>
</li>
<li><p>Using <a class="reference external" href="mailto:HSE&#37;&#52;&#48;PBE">HSE<span>&#64;</span>PBE</a> scheme with hybrid structure</p>
<p>Second approach is still using <a class="reference external" href="mailto:HSE&#37;&#52;&#48;PBE">HSE<span>&#64;</span>PBE</a> method but the optimized structure is
calculated using hybrid functional. Since the band calculation with hybrid functional
is too expensive, the k-points corresponding to the VBM and CBM are determined by using
GGA method. For this calculation, users can use the commands below. Here, if potential_type
in hybrid_oneshot is the main category, the method tags (HSE and GGA) are child subcategory
not parent subcategory. Please be careful.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">relaxation</span><span class="p">:</span>
<span class="n">potential_type</span><span class="p">:</span>
<span class="o">-</span> <span class="n">GGA</span>
<span class="o">-</span> <span class="n">HSE</span>
<span class="n">hybrid_oneshot</span><span class="p">:</span>
<span class="n">potential_type</span><span class="p">:</span>
<span class="o">-</span> <span class="o">-</span> <span class="n">HSE</span>
<span class="o">-</span> <span class="n">GGA</span>
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="organic-crystal">
<h2>Organic crystal<a class="headerlink" href="#organic-crystal" title="Permalink to this headline"></a></h2>
<p>Organic crystals usually have lower Young’s modulus than inorganic materials.
Thus, the error in the structural parameters can be substantial and they require
high precision for calculation. The tags below can control the precision of calculation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cif2vasp</span><span class="p">:</span>
<span class="n">INCAR</span><span class="p">:</span>
<span class="n">EDIFF</span><span class="p">:</span> <span class="mf">1e-08</span>

<span class="n">convergence_test</span><span class="p">:</span>
<span class="n">enconv</span><span class="p">:</span> <span class="mf">0.001</span>
<span class="n">prconv</span><span class="p">:</span> <span class="mi">1</span>

<span class="n">relaxation</span><span class="p">:</span>
<span class="n">pressure</span><span class="p">:</span> <span class="mi">1</span>
<span class="n">force</span><span class="p">:</span> <span class="mf">0.002</span>
</pre></div>
</div>
</div>
</div>


Expand Down
16 changes: 16 additions & 0 deletions docs/_build/html/Input/Configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,22 @@ <h2>Effective_mass<a class="headerlink" href="#effective-mass" title="Permalink
</dd>
</dl>
</li>
<li><dl>
<dt>temperature_for_fermi:</dt><dd><p>It controls the temperature to estimate the hole or electron distribution
based on the Fermi-Dirac function.</p>
<p>Usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">effective_mass</span><span class="p">:</span>
<span class="n">temperature_for_fermi</span><span class="p">:</span> <span class="p">[</span><span class="n">real</span><span class="p">]</span>
</pre></div>
</div>
<p>Default:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">effective_mass</span><span class="p">:</span>
<span class="n">temperature_for_fermi</span><span class="p">:</span> <span class="mi">300</span>
</pre></div>
</div>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
</div>
Expand Down
6 changes: 5 additions & 1 deletion docs/_build/html/Input/Input.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ <h1>Input<a class="headerlink" href="#input" title="Permalink to this headline">
<li class="toctree-l2"><a class="reference internal" href="Configuration.html#effective-mass">Effective_mass</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Advanced_configuration.html">Advanced configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="Advanced_configuration.html">Advanced configuration</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Advanced_configuration.html#to-get-more-accurate-band-gap">To get more accurate band gap</a></li>
<li class="toctree-l2"><a class="reference internal" href="Advanced_configuration.html#organic-crystal">Organic crystal</a></li>
</ul>
</li>
</ul>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions docs/_build/html/Installation/Installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Overview" href="../Overview/Overview.html" />
<link rel="prev" title="Welcome to AMP2’s documentation!" href="../index.html" />
<link rel="prev" title="AMP2 Manual" href="../index.html" />
</head>

<body class="wy-body-for-nav">
Expand Down Expand Up @@ -230,12 +230,12 @@ <h2>Execution AMP<sup>2</sup><a class="headerlink" href="#execution-amp2" title=
<ul class="simple">
<li><p>[src_path] is the path for directory of source codes for AMP<sup>2</sup>.</p></li>
<li><p>[path for configuration file] is the path for configuration file (config.yaml).</p></li>
<li><p>[path for nodefile] is used to record the information of computing nodes such as PBS_nodefile in</p></li>
</ul>
<p>Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
<li><p>[path for nodefile] is used to record the information of computing nodes such as PBS_nodefile in
Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
the command, “echo $PBS_nodefile &gt; nodefile”. Also, users can save an arbitrary text
by writing in the nodefile.
- [the number of cores] is the number of cores to be used in parallel computing.</p>
by writing in the nodefile.</p></li>
<li><p>[the number of cores] is the number of cores to be used in parallel computing.</p></li>
</ul>
<p>For the convenience, we provide the shell script file (run.sh) as following.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>echo &#39;node information&#39; &gt; nodefile
NPROC=16 # The number of cores for parallel computing
Expand Down Expand Up @@ -272,7 +272,7 @@ <h2>Execution AMP<sup>2</sup><a class="headerlink" href="#execution-amp2" title=
<a href="../Overview/Overview.html" class="btn btn-neutral float-right" title="Overview" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


<a href="../index.html" class="btn btn-neutral float-left" title="Welcome to AMP2’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="../index.html" class="btn btn-neutral float-left" title="AMP2 Manual" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

</div>

Expand Down
56 changes: 55 additions & 1 deletion docs/_build/html/_sources/Input/Advanced_configuration.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,58 @@ config_def.yaml:
- hole
- electron
temperature_for_fermi: 300 # The temperature to estimate the Fermi distribution
fermi_for_cutoff: 0.99 # Boundary condition for valid Fermi distribution (1-f)
fermi_for_cutoff: 0.99 # Boundary condition for valid Fermi distribution (1-f)

To get more accurate band gap
-----------------------------

We suggest two approaches to get more accurate band gap.

- Band calculation with hybrid functional

In the basic version, the band calculation is performed using PBE scheme.
However, users can add the tags below to use hybrid functional for structure
optimization and band calculation.
::
relaxation:
potential_type:
- HSE
band_calculation:
potential_type:
- HSE

- Using HSE@PBE scheme with hybrid structure

Second approach is still using HSE@PBE method but the optimized structure is
calculated using hybrid functional. Since the band calculation with hybrid functional
is too expensive, the k-points corresponding to the VBM and CBM are determined by using
GGA method. For this calculation, users can use the commands below. Here, if potential_type
in hybrid_oneshot is the main category, the method tags (HSE and GGA) are child subcategory
not parent subcategory. Please be careful.
::
relaxation:
potential_type:
- GGA
- HSE
hybrid_oneshot:
potential_type:
- - HSE
- GGA

Organic crystal
---------------
Organic crystals usually have lower Young's modulus than inorganic materials.
Thus, the error in the structural parameters can be substantial and they require
high precision for calculation. The tags below can control the precision of calculation.
::
cif2vasp:
INCAR:
EDIFF: 1e-08

convergence_test:
enconv: 0.001
prconv: 1

relaxation:
pressure: 1
force: 0.002
13 changes: 13 additions & 0 deletions docs/_build/html/_sources/Input/Configuration.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,16 @@ The details are explained in the paper.
carrier_type:
- hole
- electron

- temperature_for_fermi:
It controls the temperature to estimate the hole or electron distribution
based on the Fermi-Dirac function.

Usage:
::
effective_mass:
temperature_for_fermi: [real]
Default:
::
effective_mass:
temperature_for_fermi: 300
8 changes: 4 additions & 4 deletions docs/_build/html/_sources/Installation/Installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ You can execute AMP\ :sup:`2`\ using Python command as following.
- [src_path] is the path for directory of source codes for AMP\ :sup:`2`\.
- [path for configuration file] is the path for configuration file (config.yaml).
- [path for nodefile] is used to record the information of computing nodes such as PBS_nodefile in
Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
the command, "echo $PBS_nodefile > nodefile". Also, users can save an arbitrary text
by writing in the nodefile.
Portable Batch System (PBS) and HOSTNAME in Sun Grid Engine (SGE). In the PBS system, we recommand to use
the command, "echo $PBS_nodefile > nodefile". Also, users can save an arbitrary text
by writing in the nodefile.
- [the number of cores] is the number of cores to be used in parallel computing.

For the convenience, we provide the shell script file (run.sh) as following.
Expand All @@ -88,4 +88,4 @@ Then, you can execute AMP\ :sup:`2`\ using shell script as following.
sh run.sh

The shell script file can be easily integrated with job scheduler program such
as PBS.
as PBS.

0 comments on commit 99e1a91

Please sign in to comment.