Skip to content

Commit

Permalink
Deploy docs to v1.1.0 by GitHub Actions triggered by 69d21f6
Browse files Browse the repository at this point in the history
  • Loading branch information
HTP-tools Developers committed Sep 14, 2024
1 parent c8508d8 commit 5691d93
Show file tree
Hide file tree
Showing 93 changed files with 14,784 additions and 0 deletions.
Binary file added manual/v1.1.0/en/cif2x-usersguide.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions manual/v1.1.0/en/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b6e3d37f03c1ca0af00ddc6b7d2e3c74
tags: 645f666f9bcd5a90fca523b33c5a78b7
86 changes: 86 additions & 0 deletions manual/v1.1.0/en/html/_sources/cif2x/about/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
****************************************************************
Introduction
****************************************************************

What is cif2x?
----------------------------------------------------------------

In recent years, the use of machine learning for predicting material properties and designing substances (known as materials informatics) has gained considerable attention.
The accuracy of machine learning depends heavily on the preparation of appropriate training data.
Therefore, the development of tools and environments for the rapid generation of training data is expected to contribute significantly to the advancement of research in materials informatics.

Cif2x is a tool that generates input files for first-principles calculations from cif files.
It constructs parts that vary depending on the type of material and computational conditions from crystal structure data, using input parameters as a template.
It is capable of generating multiple input files tailored to specific computational conditions.
Currently, it supports `VASP <https://www.vasp.at>`_, `Quantum ESPRESSO <https://www.quantum-espresso.org>`_, `OpenMX <http://www.openmx-square.org>`_, and `AkaiKKR <http://kkr.issp.u-tokyo.ac.jp>`_.

License
----------------------------------------------------------------

The distribution of the program package and the source codes for cif2x follow GNU General Public License version 3 (GPL v3) or later.

Contributors
----------------------------------------------------------------

This software was developed by the following contributors.

- Developers

- Kazuyoshi Yoshimi (The Instutite for Solid State Physics, The University of Tokyo)

- Tatsumi Aoyama (The Instutite for Solid State Physics, The University of Tokyo)

- Yuichi Motoyama (The Instutite for Solid State Physics, The University of Tokyo)

- Masahiro Fukuda (The Instutite for Solid State Physics, The University of Tokyo)

- Kota Ido (The Instutite for Solid State Physics, The University of Tokyo)

- Tetsuya Fukushima (The National Institute of Advanced Industrial Science and Technology (AIST))

- Shusuke Kasamatsu (Yamagata University)

- Takashi Koretsune (Tohoku University)

- Project Corrdinator

- Taisuke Ozaki (The Instutite for Solid State Physics, The University of Tokyo)

Release history
----------------------------------------------------------------

ver.1.1.0
Released on 2024/09/14

ver.1.0.1
Released on 2024/03/31

ver.1.0.0
Released on 2024/03/19

ver.1.0-alpha
Released on 2023/12/28

Copyright
----------------------------------------------------------------

.. only:: html

|copy| *2023- The University of Tokyo. All rights reserved.*

.. |copy| unicode:: 0xA9 .. copyright sign

.. only:: latex

:math:`\copyright` *2023- The University of Tokyo. All rights reserved.*


This software was developed with the support of "Project for advancement of software usability in materials science" of The Institute for Solid State Physics, The University of Tokyo.

Operating environment
----------------------------------------------------------------

This tool was tested on the following platforms:

- Ubuntu Linux + python3

47 changes: 47 additions & 0 deletions manual/v1.1.0/en/html/_sources/cif2x/appendix/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. _sec-cif2x-appendix:

================================================================
Extension guide
================================================================

Adding modes of Quantum ESPRESSO
----------------------------------------------------------------

In order to add supports to modes of Quantum ESPRESSO, the mapping between the modes and the transformation classes should be added to ``create_modeproc()`` function in ``src/cif2x/qe/calc_mode.py``.

.. code-block:: python
def create_modeproc(mode, qe):
if mode in ["scf", "nscf"]:
modeproc = QEmode_pw(qe)
else:
modeproc = QEmode_generic(qe)
return modeproc
The transformation functionality for each mode is provided as a derived class of ``QEmode_base`` class. This class implements methods ``update_namelist()`` for updating the namelist block, and ``update_cards()`` for generating data of card blocks.
In the current version, two classes are provided: ``QEmode_pw`` class for scf and nscf calculations of pw.x, and ``QEmode_generic`` class for generating output as-is.

.. code-block:: python
class QEmode_base:
def __init__(self, qe):
def update_namelist(self, content):
def update_cards(self, content):
For the namelist, the transformation class generates values for blank entries from crystal structure data and other sources. It may also force to set values such as the lattice parameters that are determined from the crystal structure data, or those that must be specified consistently with other parameters. The functions are provided for each mode separately.

For card blocks, a function is provided for each card, and the mapping between the card type and the function is given in the ``card_table`` variable.
The method ``update_cards()`` in the base class picks up and runs the function associated to the card, and updates the content of the card. Of course, a new ``update_cards()`` function may be defined.

.. code-block:: python
self.card_table = {
'CELL_PARAMETERS': generate_cell_parameters,
'ATOMIC_SPECIES': generate_atomic_species,
'ATOMIC_POSITIONS': generate_atomic_positions,
'K_POINTS': generate_k_points,
}
The functions for cards are gathered in ``src/cif2x/qe/cards.py`` with the function names as ``generate_{card name}``. These functions takes parameters for card blocks as argument, and returns a dictionary containing the card name, the options, and the data field.
123 changes: 123 additions & 0 deletions manual/v1.1.0/en/html/_sources/cif2x/basic-usage.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
Installation and basic usage
================================================================

**Prerequisite**

Input file generator for first-principles calculation ``cif2x`` included in HTP-tools requires the following programs and libraries:

- python 3.x
- pymatgen module
- ruamel.yaml module
- f90nml module
- qe-tools module
- numpy module
- pandas module
- monty module
- OpenBabel module (optional)
- AkaiKKRPythonUtil module

For A tool to retrieve crystallographic data from databases ``getcif``, the additional library is required:

- mp-api module


**Official pages**

- `GitHub repository <https://github.com/issp-center-dev/cif2x>`_

**Downloads**

cif2x can be downloaded by the following command with git:

.. code-block:: bash
$ git clone https://github.com/issp-center-dev/cif2x.git
**Installation**

Once the source files are obtained, you can install cif2x by running the following command. The required libraries will also be installed automatically at the same time.

.. code-block:: bash
$ cd ./cif2x
$ python3 -m pip install .
The executable files ``cif2x`` and ``getcif`` will be installed.
You may need to add ``--user`` option next to ``install`` keyword above in case you are not allowed to install packages system-wide.

AkaiKKRPythonUtil module need to be installed separately. The source package is available from `the repository <https://github.com/AkaiKKRteam/AkaiKKRPythonUtil>`_. Then follow the steps below to install the module along with the required seaborn module:

.. code-block:: bash
$ git clone https://github.com/AkaiKKRteam/AkaiKKRPythonUtil.git
$ cd ./AkaiKKRPythonUtil/library/PyAkaiKKR
$ python3 -m pip install .
$ python3 -m pip install seaborn
**Directory structure**

::

.
|-- LICENSE
|-- README.md
|-- pyproject.toml
|-- docs/
| |-- ja/
| |-- en/
| |-- tutorial/
|-- src/
| |-- cif2x/
| |-- __init__.py
| |-- main.py
| |-- cif2struct.py
| |-- struct2qe.py
| |-- qe/
| | |-- __init__.py
| | |-- calc_mode.py
| | |-- cards.py
| | |-- content.py
| | |-- qeutils.py
| | |-- tools.py
| |-- struct2vasp.py
| |-- struct2openmx.py
| |-- openmx/
| | |-- __init__.py
| | |-- vps_table.py
| |-- struct2akaikkr.py
| |-- akaikkr/
| | |-- make_input.py
| | |-- read_input.py
| | |-- run_cif2kkr.py
| |-- utils.py
| |-- getcif/
| |-- __init__.py
| |-- main.py
|-- sample/


**Basic usage**

``cif2x`` is a tool to generate a set of input files for first-principles calculation software. It takes an input parameter file as a template, and generates parameter items that may vary by materials and calculation conditions from crystallographic data. In the present version, ``cif2x`` supports Quantum ESPRESSO, VASP, OpenMX, and AkaiKKR.

#. Prepare input parameter file

First, you need to create an input parameter file in YAML format that describes contents of the input file to be generated for the first-principles calculation software.

#. Prepare crystal structure files and pseudo-potential files

The crystal structure data need to be prepared for the target materials. The file format is CIF, POSCAR, xfs, or those supported by pymatgen.

For Quantum ESPRESSO, the pseudo-potential files and the index file in CSV format need to be placed. Their locations are specified in the input parameter file.

For VASP, the location of the pseudo-potential files will be specified in a file ``~/.config/.pmgrc.yaml`` or by an environment variable. It may be specified in the input parameter file.

#. Run command

Run ``cif2x`` command with the input parameter file and the crystal structure data as arguments. To generate input files for Quantum ESPRESSO, the target option ``-t QE`` should be specified. The option turns to ``-t VASP`` for VASP, ``-t OpenMX`` for OpenMX, and ``-t AkaiKKR`` for AkaiKKR.

.. code-block:: bash
$ cif2x -t QE input.yaml material.cif
56 changes: 56 additions & 0 deletions manual/v1.1.0/en/html/_sources/cif2x/command/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Command reference
================================================================

cif2x
----------------------------------------------------------------

Generate input files for first-principles calculation software

SYNOPSIS:

.. code-block:: bash
cif2x [-v][-q] -t target input_yaml material.cif
cif2x -h
cif2x --version
DESCRIPTION:

This program reads an input parameter file specified by ``input_yaml`` and a crystal data file specified by ``material.cif``, and generates a set of input files for first-principles calculation software. In the current version, the supported software includes Quantum ESPRESSO, VASP, and OpenMX.
It takes the following command line options.

- ``-v``

increases verbosity of the runtime messages. When specified multiple times, the program becomes more verbose.

- ``-q``

decreases verbosity of the runtime messages. It cancels the effect of ``-v`` option, and when specified multiple times, the program becomes more quiet.

- ``-t`` *target*

specifies the target first-principles calculation software. The supported software for *target* is listed as follows:

- ``QE``, ``espresso``, ``quantum_espresso``: generates input files for Quantum ESPRESSO.

- ``VASP``: generates input files for VASP.

- ``OpenMX``: generates input files for OpenMX.

- ``AkaiKKR``: generates input files for AkaiKKR.

- ``input_yaml``

specifies an input parameter file in YAML format.

- ``material.cif``

specifies crystal structure data file. It is in CIF (Crystallographic Information Framework) format, or other format supported by pymatgen.

- ``-h``

displays help and exits.

- ``--version``

displays version information.
Loading

0 comments on commit 5691d93

Please sign in to comment.