Giter VIP home page Giter VIP logo

alm's Introduction

ALM

License Doc status Conda build

Version 2.0.0 Dev


Introduction

This is a software for calculating harmonic and anharmonic interatomic force constants in solids and molecules.

Features

  • Extraction of harmonic and anharmonic force constants based on the supercell approach
  • Compressive sensing methods for an efficient and accurate estimation of force constants (LASSO, Elastic net)
  • Applicable to any crystal structures and low-dimensional systems
  • Accurate treatment of translational and rotational invariance
  • Interface to VASP, Quantum-ESPRESSO, OpenMX, xTAPP, and LAMMPS codes
  • API for python and C++

License

Copyright (c) 2014 Terumasa Tadano This software is released under the MIT license. For license rights and limitations, see LICENSE.txt file.

Author

  • Terumasa Tadano
  • Atsushi Togo

alm's People

Contributors

ttadano avatar atztogo avatar jochym avatar

Stargazers

Takuya Naruse avatar QiaoLin-Yang avatar Asif_em2r avatar Masato Ohnishi avatar  avatar King Wang avatar  avatar Kohei Shinohara avatar  avatar Hao Gao avatar Liangting avatar crxvt avatar  avatar Yue-Wen Fang avatar Chrinide avatar Li Zhu avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

alm's Issues

setting cutoff

I am trying to setup some cutoff in the python version but somehow I fail to find docs about

&cutoff
- 8.0 4.0
H-C 8.0 4.0
H-O 8.0 4.0
H-Zn 8.0 4.0
C-O 8.0 4.0
C-Zn 8.0 4.0
O-Zn 8.0 4.0
/

any help appreciated.

alamode and phonopy-ALM interface

Dear Dr. Tadano, and Dr. Togo

Not sure if this the right place for this.

I have been trying to use phonopy-alm interface to fit force-constants within ALM and trasnlate them back to phonopy. I am using phonopy ALM python library for this as API.

I did two test
(1) Fit the force constants within alamode (alm part of alamode) using the force and displacement and generated dispersion within anphonon i got good expected results. This is shown as Alamode (blue lines)

(2) When i use phonopy-ALM interface the dispersion is bit different... These are magneta line

This is shown in the attached plot.
Alamode-phonopy-ALM-comparsion

Note that the same fitting method is used for these two method with identical cutoff and other parameters. Similar issue is also occur for AlN example, where small negative frequency appear near gamma point which disappear within alamode code)..

Also it is possible to invoke phonopy-alm interface with command line?

This seems a fit strange to be and I am not able to identify the source of this difference... Any pointers will be helpful.

Thank for your time/

Thanks,
Alex

FCSXML file

The preparation stage of AiiDA CalcJob does not allow direct use of file paths, which makes it difficult to create AiiDA scripts using ALM.
Python code is

            reg = LinearRegression(fit_intercept=False).fit(X, y)
            alm.set_fc(reg.coef_)
            alm.save_fc(filename=fname_fcs, format="alamode")

and fname_fcs is used in anphon input as

 FCSXML = {fname_fcs}

But, AiiDA can't specify fname_fcs as far as I understand. AiiDA script must be something like

 with folder.open(self.options.input_filename, 'w', encoding='utf8') as handle:
            make_alm_in(alm_param, handle=handle)

Is it possible to use the file hander instead of fname_fcs?

Probably
fc2 = alm.get_fc(1, mode='all')
can obtain all the harmonic force costants.

Though https://alm.readthedocs.io/en/develop/python-module.html?highlight=create_dataset intoduces

    with h5py.File('fc.hdf5', 'w') as w:
        w.create_dataset('fc2', data=fc2, compression='gzip')
        w.create_dataset('fc3', data=fc3, compression='gzip')

how can I make the FCSXML file from fc2?

Use HDF5 data format to store force constants

Currently, ALM stores calculated force constants in a single XML file when executed via the command line. This approach often results in a huge XML file especially when the symmetry of the system is low and/or the higher-order (>3) force constants are included. Besides, reading a data subset from a huge XML by the boost XML parser, which is done in the anphon code of ALAMODE, is very inefficient.

I expect HDF5 library can solve these performance issues as it can store data in binary format (if I understand correctly). Many major languages, such as python, have their own interface to the HDF5 data format. This is an advantage of using HDF5.

I need to work on the following points:

  1. Decide the structure of the HDF5 force constant file
  2. Implement the parser for C++
  3. Write a document describing the data structure

Any other points?

Rotational invariance is not supported in python API

I notice that new version 1.1.0 of alamode can support applying rotational symmetry to force constant. However, in python API , say ALM, this function is not implimented. The responsible module is ALM.set_constraint(). Could you give me some advice to modify the code?

libtinfo.so.6: no version information available (required by bash)

This isn't an error, but the warning message

libtinfo.so.6: no version information available (required by bash)

is shown when $CONDA_PREFIX/lib is defined as

export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH

In my case, libtinfo.so.6 is in /usr/lib/x86_64-linux-gnu/. So, if /usr/lib/x86_64-linux-gnu/ is placed before $CONDA_PREFIX/lib, the warning message doesn't appear.
Ref.
rstudio/rstudio#8278

An example for the test of command line ALM required

Writing tests using API is not the issue here. Some test of command line interface is needed to ease the check. The last one can be shared with the test for API. Any idea?

  • Input files: alamode/example/Si is OK for the first example
  • A short document how to run and test: can be extracted from ALAMODE tutorial with small modification
  • A shell script to run the test
  • Parsers of .fcs and .xml files
  • A (python?) script to assert data in .fcs and .xml files HDF5.

Strange behavior with alm + numpy.linalg (in anaconda python) on MacOS

I found a strange behavior of the alamode API when the alm and numpy modules were loaded in the same project.

For example, the script https://github.com/ttadano/ALM/blob/develop/example/Si_fitting_external.py worked as expected in a Linux environment (tested on ubuntu), but it stopped in MacOS at the following line:

#Perform fitting
fc = np.linalg.lstsq(amat, bvec, rcond=1.0e-15)

Strangely, in another MacOS environment, the above numpy function returned some values (fc), but the returned value changes every time I run the script.

In both cases, I used an anaconda version of python3 installed via pyenv (anaconda3-5.0.1), and the alamode API was built by using GCC installed via homebrew (gcc: stable 7.3.0). Probably, this strange behavior results from the incompatibility between GCC and anaconda (MKL?).

I found the issue can be avoided by switching off the OpenMP option in GCC when building the alm API or by setting MKL_NUM_THREADS=1 before running the script.

List of symmetrically dependent IFC

I've been trying to understand the irreducible representation of force constants better and was wondering if there is some way to list which IFC indices should be identical?

Say we took the setup from the fcsxml example where we calculate the force constants in what ALAMODE calls the origin format which as noted by the docstrings is reducible. What I'm after is basically:

  • (1x, 2y), (1y, 3z) and (2y, 5z) are symmetrically identical
  • (2z, 3y), (1z, 2x),... are symmetrically identical
  • etc.

EDIT: Maybe this is an ill-posed question since the symmetry operations just tell you how a pair of IFC are related (e.g. $\phi_{12} = a\phi_{13} + b \phi_{23}$) not which values in the supercell representation are identical.

The linear combinations that form the irreps would also be useful information.

Thanks!

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.