-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from wistaria/alamode
Alamode
- Loading branch information
Showing
20 changed files
with
350 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ALAMODE | ||
|
||
## SUMMARY | ||
|
||
A program package for constructing interatomic force fields which explicitly consider lattice anharmonicity. In combination with a molecular dynamics simulator LAMMPS and an external first-principles package such as VASP and Quantum ESPRESSO, ALAMODE extracts harmonic/anharmonic force constants of solids and calculates phonon dispersion, phonon DOS, Gruneisen parameter, phonon-phonon scattering probability, lattice thermal-conductivity, anharmonic phonons at finite temperature, phonon free energy and so on. | ||
|
||
## LICENSE | ||
|
||
MIT License | ||
|
||
## OFFICIAL PAGE | ||
|
||
https://alamode.readthedocs.io/en/latest/ | ||
|
||
## MateriApps URL | ||
|
||
https://ma.issp.u-tokyo.ac.jp/en/app/155 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ALAMODE | ||
|
||
## SUMMARY | ||
|
||
格子振動の非調和性を露わに考慮した原子間ポテンシャルを構築するプログラムパッケージ。VASPやQuantum ESPRESSOなどの第一原理計算プログラムやLAMMPSの計算結果から調和・非調和force constantを推定し、それらをもとにフォノン分散、フォノン状態密度、グリューナイゼン定数、フォノン‐フォノン散乱強度、格子熱伝導率、有限温度における非調和フォノン、フォノン由来の自由エネルギーなどを計算することが可能。 | ||
|
||
## LICENSE | ||
|
||
MIT LICENSE | ||
|
||
## OFFICIAL PAGE | ||
|
||
https://alamode.readthedocs.io/en/latest/ | ||
|
||
## MateriApps URL | ||
|
||
https://ma.issp.u-tokyo.ac.jp/app/151 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd build | ||
make ${MAKE_J} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
mkdir -p $PREFIX/bin | ||
|
||
cp build/alm/alm $PREFIX/bin | ||
cp build/anphon/anphon $PREFIX/bin | ||
|
||
mkdir -p $PREFIX/tools | ||
for name in analyze_phonons dfc2 fc_virtual parse_fcsxml qe2alm; do | ||
cp build/tools/$name $PREFIX/tools | ||
done | ||
|
||
cp tools/*.py $PREFIX/tools | ||
cp -r tools/interface $PREFIX/tools | ||
|
||
cp -r example $PREFIX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set -u | ||
|
||
rm -rf build | ||
mkdir build | ||
cd build | ||
|
||
${CMAKE} \ | ||
-DCMAKE_INSTALL_PREFIX=${PREFIX} \ | ||
-DCMAKE_VERBOSE_MAKEFILE=1 \ | ||
-DSPGLIB_ROOT=${SPGLIB_ROOT} \ | ||
-DFFTW3_ROOT=${FFTW3_ROOT} \ | ||
-DCMAKE_CXX_FLAGS="-O3 ${MA_EXTRA_FLAGS}" \ | ||
../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set -u | ||
|
||
rm -rf build | ||
mkdir build | ||
cd build | ||
|
||
${CMAKE} \ | ||
-DCMAKE_INSTALL_PREFIX=${PREFIX} \ | ||
-DCMAKE_VERBOSE_MAKEFILE=1 \ | ||
-DUSE_MKL_FFT=yes \ | ||
-DSPGLIB_ROOT=${SPGLIB_ROOT} \ | ||
-DCMAKE_CXX_FLAGS="-O3 ${MA_EXTRA_FLAGS}" \ | ||
-DCMAKE_C_COMPILER=icc \ | ||
-DCMAKE_CXX_COMPILER=icpc \ | ||
../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
URL=https://github.com/ttadano/alamode/archive/refs/tags/v.${__VERSION__}.tar.gz | ||
ARCHIVE=${SOURCE_DIR}/${__NAME__}-${__VERSION__}.tar.gz | ||
|
||
if [ -f $ARCHIVE ]; then :; else | ||
check wget $URL -O $ARCHIVE | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/sh | ||
cat << EOF > config.txt | ||
# configurable variables (e.g. compiler) | ||
# use default if not defined | ||
export CMAKE="${CMAKE:-cmake}" | ||
export ISSP_UCOUNT="${ISSP_UCOUNT:-/home/issp/materiapps/bin/issp-ucount}" | ||
export MAKE_J="${MAKE_J:-"-j1"}" | ||
export SCALAPACK_LIBRARIES="${SCALAPACK_LIBRARIES:-""}" | ||
export MA_EXTRA_FLAGS="${MA_EXTRA_FLAGS:-""}" | ||
# export explicitly if defined | ||
test -n "${CC+defined}" && export CC="$CC" | ||
test -n "${FC+defined}" && export FC="$FC" | ||
EOF | ||
. ./config.txt | ||
|
||
set -e | ||
|
||
XTRACED=$(set -o | awk '/xtrace/{ print $2 }') | ||
if [ "$XTRACED" = "on" ]; then | ||
SHFLAG="-x" | ||
fi | ||
|
||
mode=${1:-default} | ||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
CONFIG_DIR=$SCRIPT_DIR/config/$mode | ||
if [ ! -d $CONFIG_DIR ]; then | ||
echo "Error: unknown mode: $mode" | ||
echo "Available list:" | ||
ls -1 $SCRIPT_DIR/config | ||
exit 127 | ||
fi | ||
DEFAULT_CONFIG_DIR=$SCRIPT_DIR/config/default | ||
|
||
export UTIL_SH=$SCRIPT_DIR/../../scripts/util.sh | ||
. $UTIL_SH | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
. ${MA_ROOT}/env.sh | ||
export PREFIX="${MA_ROOT}/${__NAME__}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}" | ||
if [ -d $PREFIX ]; then | ||
echo "Error: $PREFIX exists" | ||
exit 127 | ||
fi | ||
export LOG=${BUILD_DIR}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}.log | ||
mv config.txt $LOG | ||
echo "mode = $mode" | tee -a $LOG | ||
|
||
rm -rf ${BUILD_DIR}/${__NAME__}-${__VERSION__} | ||
pipefail check sh $SHFLAG ${SCRIPT_DIR}/setup.sh \| tee -a $LOG | ||
cd ${BUILD_DIR}/${__NAME__}-${__VERSION__} | ||
start_info | tee -a $LOG | ||
|
||
for process in preprocess build install postprocess; do | ||
if [ -f $CONFIG_DIR/${process}.sh ]; then | ||
echo "[${process}]" | tee -a $LOG | ||
pipefail check sh $SHFLAG $CONFIG_DIR/${process}.sh \| tee -a $LOG | ||
elif [ -f $DEFAULT_CONFIG_DIR/${process}.sh ]; then | ||
echo "[${process}]" | tee -a $LOG | ||
pipefail check sh $SHFLAG $DEFAULT_CONFIG_DIR/${process}.sh \| tee -a $LOG | ||
fi | ||
done | ||
|
||
finish_info | tee -a $LOG | ||
|
||
ROOTNAME=$(toupper ${__NAME__})_ROOT | ||
|
||
cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh | ||
# ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) | ||
. ${MA_ROOT}/env.sh | ||
export ${ROOTNAME}=$PREFIX | ||
export PATH=\${${ROOTNAME}}/bin:\$PATH | ||
EOF | ||
VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh | ||
rm -f $VARS_SH | ||
cp -f ${BUILD_DIR}/${__NAME__}vars.sh $VARS_SH | ||
cp -f $LOG ${MA_ROOT}/${__NAME__}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
. $MA_ROOT/env.sh | ||
|
||
VARS_SH=$MA_ROOT/${__NAME__}/${__NAME__}vars-$__VERSION__-$__MA_REVISION__.sh | ||
rm -f $MA_ROOT/${__NAME__}/${__NAME__}vars.sh | ||
ln -s $VARS_SH $MA_ROOT/${__NAME__}/${__NAME__}vars.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
ROOT_FILE=README.md | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
sh ${SCRIPT_DIR}/download.sh | ||
|
||
NV=${__NAME__}-${__VERSION__} | ||
cd $BUILD_DIR | ||
if [ -d $NV ]; then :; else | ||
check mkdir -p $NV | ||
tarfile=$SOURCE_DIR/${NV}.tar.gz | ||
sc=`calc_strip_components $tarfile $ROOT_FILE` | ||
check tar zxf $tarfile -C $NV --strip-components=$sc | ||
cd $NV | ||
if [ -f $SCRIPT_DIR/patch/${NV}.patch ]; then | ||
patch -p1 < $SCRIPT_DIR/patch/${NV}.patch | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ALAMODE_VERSION="1.5.0" | ||
ALAMODE_MA_REVISION="1" | ||
|
||
__NAME__=alamode | ||
__VERSION__=${ALAMODE_VERSION} | ||
__MA_REVISION__=${ALAMODE_MA_REVISION} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -u | ||
|
||
cd build | ||
make ${MAKE_J} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -u | ||
|
||
cd build | ||
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -u | ||
|
||
rm -rf build && mkdir -p build && cd build | ||
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
VERSION_MAJOR=$(echo "${__VERSION__}" | cut -d . -f 1,2) | ||
if [ -f $SOURCE_DIR/${__NAME__}-${__VERSION__}.tar.gz ]; then :; else | ||
check wget -O $SOURCE_DIR/${__NAME__}-${__VERSION__}.tar.gz https://github.com/spglib/spglib/archive/refs/tags/v${__VERSION__}.tar.gz | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/sh | ||
cat << EOF > config.txt | ||
# configurable variables (e.g. compiler) | ||
# use default if not defined | ||
export MAKE_J="${MAKE_J:-"-j1"}" | ||
# export explicitly if defined | ||
test -n "${CC+defined}" && export CC="$CC" | ||
EOF | ||
. ./config.txt | ||
|
||
set -e | ||
|
||
XTRACED=$(set -o | awk '/xtrace/{ print $2 }') | ||
if [ "$XTRACED" = "off" ]; then | ||
SHFLAG="" | ||
else | ||
SHFLAG="-x" | ||
fi | ||
|
||
mode=${1:-default} | ||
export SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
CONFIG_DIR=$SCRIPT_DIR/config/$mode | ||
if [ ! -d $CONFIG_DIR ]; then | ||
echo "Error: unknown mode: $mode" | ||
echo "Available list:" | ||
ls -1 $SCRIPT_DIR/config | ||
exit 127 | ||
fi | ||
DEFAULT_CONFIG_DIR=$SCRIPT_DIR/config/default | ||
|
||
export UTIL_SH=$SCRIPT_DIR/../../scripts/util.sh | ||
. $UTIL_SH | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
. ${MA_ROOT}/env.sh | ||
export PREFIX="${MA_ROOT}/${__NAME__}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}" | ||
if [ -d $PREFIX ]; then | ||
echo "Error: $PREFIX exists" | ||
exit 127 | ||
fi | ||
export LOG=${BUILD_DIR}/${__NAME__}-${__VERSION__}-${__MA_REVISION__}.log | ||
mv config.txt $LOG | ||
|
||
set +e | ||
. $SCRIPT_DIR/../../tools/openssl/find.sh; if [ ${MA_HAVE_OPENSSL} = "no" ]; then echo "Error: openssl not found"; exit 127; fi | ||
set -e | ||
|
||
rm -rf ${BUILD_DIR}/${__NAME__}-${__VERSION__} | ||
pipefail sh $SHFLAG ${SCRIPT_DIR}/setup.sh \| tee -a $LOG | ||
cd ${BUILD_DIR}/${__NAME__}-${__VERSION__} | ||
start_info | tee -a $LOG | ||
|
||
for process in preprocess build install postprocess; do | ||
if [ -f $CONFIG_DIR/${process}.sh ]; then | ||
echo "[${process}]" | tee -a $LOG | ||
pipefail check sh $SHFLAG $CONFIG_DIR/${process}.sh \| tee -a $LOG | ||
elif [ -f $DEFAULT_CONFIG_DIR/${process}.sh ]; then | ||
echo "[${process}]" | tee -a $LOG | ||
pipefail check sh $SHFLAG $DEFAULT_CONFIG_DIR/${process}.sh \| tee -a $LOG | ||
fi | ||
done | ||
|
||
finish_info | tee -a $LOG | ||
|
||
ROOTNAME=$(toupper ${__NAME__})_ROOT | ||
|
||
cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh | ||
# ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) | ||
export ${ROOTNAME}=$PREFIX | ||
export LD_LIBRARY_PATH=\${${ROOTNAME}}/lib64:\$LD_LIBRARY_PATH | ||
export DYLD_LIBRARY_PATH=\${${ROOTNAME}}/lib64:\$DYLD_LIBRARY_PATH | ||
EOF | ||
VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh | ||
rm -f $VARS_SH | ||
cp -f ${BUILD_DIR}/${__NAME__}vars.sh $VARS_SH | ||
cp -f $LOG ${MA_ROOT}/${__NAME__}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
. $MA_ROOT/env.sh | ||
|
||
VARS_SH=$MA_ROOT/${__NAME__}/${__NAME__}vars-$__VERSION__-$__MA_REVISION__.sh | ||
rm -f $MA_ROOT/env.d/${__NAME__}vars.sh | ||
ln -s $VARS_SH $MA_ROOT/env.d/${__NAME__}vars.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT_DIR=$(cd "$(dirname $0)"; pwd) | ||
. $SCRIPT_DIR/../../scripts/util.sh | ||
. $SCRIPT_DIR/version.sh | ||
set_prefix | ||
|
||
sh $SCRIPT_DIR/download.sh | ||
|
||
cd $BUILD_DIR | ||
if [ -d ${__NAME__}-${__VERSION__} ]; then :; else | ||
check tar zxf $SOURCE_DIR/${__NAME__}-${__VERSION__}.tar.gz | ||
if [ -f $SCRIPT_DIR/patch/${__NAME__}-${__VERSION__}.patch ]; then | ||
cd ${__NAME__}-${__VERSION__} | ||
cat $SCRIPT_DIR/patch/${__NAME__}-${__VERSION__}.patch | patch -p1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SPGLIB_VERSION="2.5.0" | ||
SPGLIB_MA_REVISION="1" | ||
|
||
__NAME__=spglib | ||
__VERSION__=${SPGLIB_VERSION} | ||
__MA_REVISION__=${SPGLIB_MA_REVISION} |