Skip to content

hlyang1992/pymtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMTP

Python wrapper to moment tensor potential.

Install

First install mlip-2, then follow the steps below to install:

export MLIP_DIR="path-to-mlip-2" 
# e.g. "/Users/hello/mlip-2"
export MLIP_LIB="path-to-lib_mlip_interface.a" 
# e.g.  /Users/hello/opt/mlip-2/lib/lib_mlip_interface.a
# gcc
CC=gcc-11 CXX=g++-11 pip install . -v

# intel
CC=icpc CXX=icpc pip install . -v

Usage

from pymtp.core import MTPCalactor
from pymtp.core import PyConfiguration
from ase.io import read

a0 = read("POSCAR")

c0 = PyConfiguration.from_ase_atoms(a0)
calc = MTPCalactor("pot.mtp")
calc.calc(c0)

print(c0.energy)
print(c0.force)
print(c0.stresses)

About

Python wrapper to moment tensor potential

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages