Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mliappy2 #1

Open
wants to merge 5 commits into
base: mliappy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions examples/mliappy/in.mliap.pytorch.Ta06A
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ create_atoms 1 box

mass 1 180.88

python simple here """
from __future__ import print_function

def simple():
foo = 0
print("Inside simple function")
try:
foo += 1
except Exception as e:
print("FOO error:", e)
"""

python simple invoke

# choose potential

include Ta06A.mliap.pytorch
Expand Down
53 changes: 53 additions & 0 deletions src/MLIAPPY/Install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update

mode=$1

# arg1 = file, arg2 = file it depends on

# enforce using portable C locale
LC_ALL=C
export LC_ALL

action () {
if (test $mode = 0) then
rm -f ../$1
elif (! cmp -s $1 ../$1) then
if (test -z "$2" || test -e ../$2) then
cp $1 ..
if (test $mode = 2) then
echo " updating src/$1"
fi
fi
elif (test -n "$2") then
if (test ! -e ../$2) then
rm -f ../$1
fi
fi
}

# force rebuild of files using python header

touch ../lmppython.h

# all package files with no dependencies

for file in *.cpp *.h; do
test -f ${file} && action $file
done

# edit 2 Makefile.package files to include/exclude package info

if (test $1 = 1) then

if (test -e ../Makefile.package) then
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_MLIAPPY |' ../Makefile.package
fi

elif (test $1 = 0) then

if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*MLIAPPY[^ \t]* //g' ../Makefile.package
fi

fi
37 changes: 0 additions & 37 deletions src/MLIAPPY/README

This file was deleted.