#! /bin/bash # This script installs mylammps automatically. Proven to work at least for fedora 13. ## Before running this script, make sure that the following numerical packages fftw2-devel.x86_64 fftw2.x86_64 fftw-static.x86_64 fftw-devel.x86_64 mpich2.x86_64 mpich2-devel.x86_64 libblas liblapack have been installed. The best option is to first download and execute the file http://www2.fizik.usm.my/configrepo/howto/inst_numeric before running this script. # This script will create a folder mylamps in ~/ (home directory of current user). # Choose either scp from www2 (not current version) or git (current/latest version) or wget. By default, wget is used. # Make sure you have git installed, or yum install git.x86_64 as root, if you wish to download with git clone (instead of scp) ######### begin downloading ########################### ##cd ~/ ### git clone http://git.icms.temple.edu/lammps-icms.git lammps-icms #git clone takes a bit longer time to complete (for lammps-icms). ### git clone http://git.icms.temple.edu/lammps-ro.git mylammps #git clone takes a bit longer time to complete (for mylammps). ##wget -r -l1 --no-parent -A.tar.gz http://www2.fizik.usm.my/configrepo/howto/mylammps/ ##cp www2.fizik.usm.my/configrepo/howto/mylammps/*.tar.gz . ##mv *.tar.gz lammps-icms.tar.gz ##tar -zxvf lammps-icms.tar.gz ##rm -rf www2.fizik.usm.my lammps-icms.tar.gz ##mv lammps-* mylammps cd ~/ # Use either Option 1 or Option 2, but not both to download the mylammps. By default, Option 2 is used. Option 2 is faster but it does not contains the lastest version of mylammps. Option 1 is slower but it downloads directly the latest version from the source in the web. ## Option 1. Uncomment if want to use this option. # git clone http://git.icms.temple.edu/lammps-ro.git mylammps ## End of Option 1 ## Option 2. Default option. wget -r -l1 --no-parent -A.tar.gz http://www2.fizik.usm.my/configrepo/howto/mylammps/ cp www2.fizik.usm.my/configrepo/howto/mylammps/*.tar.gz . mv lammps-* mylammps.tar.gz tar -zxvf mylammps.tar.gz mv lammps-* mylammps rm -rf www2.fizik.usm.my mylammps.tar.gz #mkdir mylammps ## End of Option 2 ####### begin installation #################################################### # atc # cd ~/mylammps cd lib cd atc wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.g++.mylammps.atc.fedora13 mv Makefile.g++ Makefile.g++.bk cp Makefile.g++.mylammps.atc.fedora13 Makefile.g++ make -f Makefile.g++ # linalg # cd ~/mylammps/lib cd linalg make -f Makefile.gfortran # mean # cd ~/mylammps/lib cd meam wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.lammps.ubuntu mv Makefile.lammps Makefile.lammps.orig mv Makefile.lammps.ubuntu Makefile.lammps make -f Makefile.gfortran # reax # cd ~/mylammps/lib cd reax wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.lammps.ubuntu mv Makefile.lammps Makefile.lammps.orig mv Makefile.lammps.ubuntu Makefile.lammps make -f Makefile.gfortran # peom # cd ~/mylammps/lib cd poems make -f Makefile.g++ # Now exit /lib cd ~/mylammps/src/MAKE wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.g++.mylammps.src.MAKE cp Makefile.g++ Makefile.g++.bk cp Makefile.g++.mylammps.src.MAKE Makefile.g++ cd ~/mylammps/src/ make yes-all make no-user-cuda make no-gpu make no-user-awpmd make no-kim make g++