Git Product home page Git Product logo

2dmat's Introduction

2DMAT -- Data-analysis software of quantum beam diffraction experiments for 2D material structure

2DMAT is a framework for applying a search algorithm to a direct problem solver to find the optimal solution. As the standard direct problem solver, the experimental data analysis software for two-dimensional material structure analysis is prepared. The direct problem solver gives the deviation between the experimental data and the calculated data obtained under the given parameters such as atomic positions as a loss function used in the inverse problem. The optimal parameters are estimated by minimizing the loss function using a search algorithm. For further use, the original direct problem solver or the search algorithm can be defined by users. 2DMAT offers wrappers of direct problem solvers for some of quantum beam diffraction experiments such as the total-reflection high-energy positron diffraction (TRHEPD) experiment. As algorithms, it offers some minimizers such as the Nelder-Mead method and some samplers such as the population annealing Monte Carlo method. In the future, we plan to add other direct problem solvers and search algorithms in 2DMAT.

Branch Build status Documentation
master (latest, stable) master doc_en doc_ja
develop (latest, unstable) -- doc_en doc_ja

py2dmat

py2dmat is a python framework library for solving inverse problems. It also offers a driver script to solve the problem with predefined optimization algorithms and direct problem solvers (py2dmat also means this script).

Prerequists

  • Required
    • python >= 3.6.8
    • numpy >= 1.14
    • tomli >= 1.2.0
  • Optional
    • scipy
      • for minsearch algorithm
    • mpi4py
      • for exchange algorithm
    • physbo >= 1.0
      • for bayes algorithm

Install

  • From PyPI (Recommended)
    • python3 -m pip install -U py2dmat
      • If you install them locally, use --user option like python3 -m pip install -U --user
  • From Source (For developers)
    1. update pip >= 19 by python3 -m pip install -U pip
    2. python3 -m pip install 2DMAT_ROOT_DIRECTORY to install py2dmat package and py2dmat command
    • 2DMAT_ROOT_DIRECTORY means the directory including this README.md file.

Simple Usage

  • py2dmat input.toml (use the installed script)
  • python3 src/py2dmat_main.py input.toml (use the raw script)
  • For details of the input file, see the document.

Files and directories of 2DMAT

  • src/
    • source codes
  • script/
    • utility scripts
  • sample/
    • sample usages
  • doc/
    • source codes of documents (manuals)
  • tests/
    • for automatic test
  • LICENSE
    • license terms (GNU GPL v3)
  • README.md
    • this file
  • pyproject.toml
    • metadata for py2dmat

License

This package is distributed under GNU General Public License version 3 (GPL v3) or later.

We hope that you cite the following references when you publish the results using 2DMAT: “Data-analysis software framework 2DMAT and its application to experimental measurements for two-dimensional material structures”, Y. Motoyama, K. Yoshimi, I. Mochizuki, H. Iwamoto, H. Ichinose, and T. Hoshi, Computer Physics Communications 280, 108465 (2022).

Bibtex:

@article{MOTOYAMA2022108465, title = {Data-analysis software framework 2DMAT and its application to experimental measurements for two-dimensional material structures}, journal = {Computer Physics Communications}, volume = {280}, pages = {108465}, year = {2022}, issn = {0010-4655}, doi = {https://doi.org/10.1016/j.cpc.2022.108465}, url = {https://www.sciencedirect.com/science/article/pii/S0010465522001849}, author = {Yuichi Motoyama and Kazuyoshi Yoshimi and Izumi Mochizuki and Harumichi Iwamoto and Hayato Ichinose and Takeo Hoshi} }

Copyright

© 2020- 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.

2dmat's People

Contributors

h-iwamoto-research avatar k-yoshimi avatar mn2007 avatar yomichi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

2dmat's Issues

Mapperでのmesh_pathを用いた計算

mesh_pathを使用する際、パラメータの組み合わせが一つだけだとエラーで落ちる。

File "2DMAT/src/py2dmat/algorithm/_algorithm.py", line 263, in _meshgrid
return grid[id_list, :], id_list
IndexError: too many indices for array

また、マニュアルにあるメッシュ定義ファイルの説明の箇所で、「2列目以降は [solver.param] セクションにある、 string_list で定義された変数に入る値が入ります。」とあるが、string_listがない場合にどのような挙動になるのかが分からない(string_listがない場合には関係ない?)。
https://issp-center-dev.github.io/2DMAT/manual/master/ja/algorithm/mapper_mpi.html

東大物性スパコンのexeファイルについて

いつもお世話になっております、早稲田大学 高山研究室の濱田雅史と申します。

東大物性研スパコンないにあるexeファイルについてお伺いしたい点があります。

スパコン上で2DMATの大域探索を行ったのですが、各grid点における計算結果(surf-bulkP.s)がgithubに上がっているsrcフォルダから作成したbulk.exe、surf.exeによる計算結果と大きく異なっていました。

参考に、あるgrid点におけるbulk.txtとsurf.txtのテキストファイル、またこれらをスパコン、自前PCで計算(github上のsrcフォルダから作成したexeファイルにより計算)し比較したものをエクセルファイルとして添付いたします。

ここで質問なのですが、スパコン内の以下のpath内にあるbulk.exe、surf.exeが2DMATの大域探索で、実行されていると思うのですが、これらは何か新しく更新されたものなのでしょうか。

「/home/issp/materiapps/intel/sim_trhepd_rheed/sim_trhepd_rheed-prerelease_0/bin/」

ご確認いただけると幸いです。
よろしきお願い致します。

スパコン_自前PC_比較.xlsx
bulk.txt
surf.txt

大域探索の規格化について

質問がございます。早稲田大学高山研究室 修士2年の濱田雅史と申します。
現在東大物性研のスーパーコンピューターohtaka上でpy2dmatを用いた大域探索を考えています。

大域探索を行うにあたり、規格化を'TOTAL'ではなく、'MAX'で行いたいと考えています。
このような設定をするには、どうすればよいでしょうか。
お答えいただけると幸いです。
よろしくい願い致します。

Mapperで生成されるファイル数に注意

Mapperを使っている方への注意です.
Mapperでは,膨大な数のファイルが生成される場合があります.例えば,100万個のmesh点の計算をすると,数千万個のファイルが生成されます.一方,コンピュータには,扱えるファイル数に限界があります.あまり多すぎると,システム的に問題になるようです.ohtakaではファイル総数への制限(ファイルの合計容量ではなくて)は,現状ではかかっていないようですが,気をつけてください.具体的には,mapperで計算が終わったら,ファイルを(必要に応じてダウンロードした上で)消すか,directroryごと1ファイルにして元ファイルは消す,と言う手段が有効だと思います.「directroryごと1ファイルにする」と言う作業は,zip, tarコマンドでできます.
参考:UNIXコマンド、ディレクトリごとzip圧縮したい時
https://rukiadia.hatenablog.jp/entry/2014/02/17/020300

大局的には,ファイル生成があまり起こらないように,コードを改変する予定です.が,それまでは,気をつけていただけると幸いです.

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.