git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9939 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-05-30 16:29:38 +00:00
parent 3f142bb498
commit 124bfc5ba7
23 changed files with 90 additions and 781 deletions

View File

@ -1,27 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp body_nparticle.cpp ..
cp compute_body_local.cpp ..
cp fix_nve_body.cpp ..
cp pair_body.cpp ..
cp body_nparticle.h ..
cp compute_body_local.h ..
cp fix_nve_body.h ..
cp pair_body.h ..
elif (test $1 = 0) then
rm -f ../body_nparticle.cpp
rm -f ../compute_body_local.cpp
rm -f ../fix_nve_body.cpp
rm -f ../pair_body.cpp
rm -f ../body_nparticle.h
rm -f ../compute_body_local.h
rm -f ../fix_nve_body.h
rm -f ../pair_body.h
fi

View File

@ -1,43 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp bond_class2.cpp ..
cp angle_class2.cpp ..
cp dihedral_class2.cpp ..
cp improper_class2.cpp ..
cp pair_lj_class2.cpp ..
cp pair_lj_class2_coul_cut.cpp ..
cp pair_lj_class2_coul_long.cpp ..
cp bond_class2.h ..
cp angle_class2.h ..
cp dihedral_class2.h ..
cp improper_class2.h ..
cp pair_lj_class2.h ..
cp pair_lj_class2_coul_cut.h ..
cp pair_lj_class2_coul_long.h ..
elif (test $1 = 0) then
rm -f ../bond_class2.cpp
rm -f ../angle_class2.cpp
rm -f ../dihedral_class2.cpp
rm -f ../improper_class2.cpp
rm -f ../pair_lj_class2.cpp
rm -f ../pair_lj_class2_coul_cut.cpp
rm -f ../pair_lj_class2_coul_long.cpp
rm -f ../bond_class2.h
rm -f ../angle_class2.h
rm -f ../dihedral_class2.h
rm -f ../improper_class2.h
rm -f ../pair_lj_class2.h
rm -f ../pair_lj_class2_coul_cut.h
rm -f ../pair_lj_class2_coul_long.h
fi

View File

@ -1,24 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_wall_colloid.cpp ..
cp pair_colloid.cpp ..
cp pair_yukawa_colloid.cpp ..
cp fix_wall_colloid.h ..
cp pair_colloid.h ..
cp pair_yukawa_colloid.h ..
elif (test $1 = 0) then
rm -f ../fix_wall_colloid.cpp
rm -f ../pair_colloid.cpp
rm -f ../pair_yukawa_colloid.cpp
rm -f ../fix_wall_colloid.h
rm -f ../pair_colloid.h
rm -f ../pair_yukawa_colloid.h
fi

View File

@ -1,19 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp atom_vec_dipole.cpp ..
cp pair_dipole_cut.cpp ..
cp atom_vec_dipole.h ..
cp pair_dipole_cut.h ..
elif (test $1 = 0) then
rm -f ../atom_vec_dipole.cpp
rm -f ../pair_dipole_cut.cpp
rm -f ../atom_vec_dipole.h
rm -f ../pair_dipole_cut.h
fi

View File

@ -25,17 +25,17 @@ depend () {
installed=1
fi
done
cd ..
if (test $installed = 0) then
return
fi
if (test $2 = 1) then
echo " reinstalling package $1"
echo " re-installing package $1"
if (test -e $1/Install.sh) then
cd $1; /bin/sh Install.sh 1; cd ..
elif (test $2 = 0) then
echo " un/reinstalling package $1"
cd $1; /bin/sh Install.sh 0; /bin/sh Install.sh 1; cd ..
else
cd $1; /bin/sh ../Install.sh 1; cd ..
fi
}

View File

@ -1,35 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 == 1) then
cp pair_brownian.cpp ..
cp pair_brownian_poly.cpp ..
cp pair_lubricate.cpp ..
cp pair_lubricate_poly.cpp ..
cp pair_lubricateU.cpp ..
cp pair_lubricateU_poly.cpp ..
cp pair_brownian.h ..
cp pair_brownian_poly.h ..
cp pair_lubricate.h ..
cp pair_lubricate_poly.h ..
cp pair_lubricateU.h ..
cp pair_lubricateU_poly.h ..
elif (test $1 == 0) then
rm ../pair_brownian.cpp
rm ../pair_brownian_poly.cpp
rm ../pair_lubricate.cpp
rm ../pair_lubricate_poly.cpp
rm ../pair_lubricateU.cpp
rm ../pair_lubricateU_poly.cpp
rm ../pair_brownian.h
rm ../pair_brownian_poly.h
rm ../pair_lubricate.h
rm ../pair_lubricate_poly.h
rm ../pair_lubricateU.h
rm ../pair_lubricateU_poly.h
fi

View File

@ -1,35 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_freeze.cpp ..
cp fix_pour.cpp ..
cp fix_wall_gran.cpp ..
cp pair_gran_hertz_history.cpp ..
cp pair_gran_hooke.cpp ..
cp pair_gran_hooke_history.cpp ..
cp fix_freeze.h ..
cp fix_pour.h ..
cp fix_wall_gran.h ..
cp pair_gran_hertz_history.h ..
cp pair_gran_hooke.h ..
cp pair_gran_hooke_history.h ..
elif (test $1 = 0) then
rm -f ../fix_freeze.cpp
rm -f ../fix_pour.cpp
rm -f ../fix_wall_gran.cpp
rm -f ../pair_gran_hertz_history.cpp
rm -f ../pair_gran_hooke.cpp
rm -f ../pair_gran_hooke_history.cpp
rm -f ../fix_freeze.h
rm -f ../fix_pour.h
rm -f ../fix_wall_gran.h
rm -f ../pair_gran_hertz_history.h
rm -f ../pair_gran_hooke.h
rm -f ../pair_gran_hooke_history.h
fi

32
src/Install.sh Normal file
View File

@ -0,0 +1,32 @@
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
# this is default Install.sh for all packages
# if package has an auxiliary library or some package files have dependencies,
# then package dir has its own customized Install.sh
mode=$1
# arg1 = file, arg2 = file it depends on
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 ! -z "$2") then
if (test ! -e ../$2) then
rm -f ../$1
fi
fi
}
# all package files with no dependencies
for file in *.cpp *.h; do
action $file
done

View File

@ -1,5 +1,3 @@
# Install/unInstall package files in LAMMPS
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
@ -49,9 +47,6 @@ include ..\/KIM\/Makefile.lammps
' ../Makefile.package.settings
fi
cp pair_kim.cpp ..
cp pair_kim.h ..
elif (test $1 = 0) then
if (test -e ../Makefile.package) then
@ -62,7 +57,4 @@ elif (test $1 = 0) then
sed -i -e '/^include.*KIM.*$/d' ../Makefile.package.settings
fi
rm -f ../pair_kim.cpp
rm -f ../pair_kim.h
fi

View File

@ -1,133 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp commgrid.cpp ..
cp ewald.cpp ..
cp ewald_disp.cpp ..
cp msm.cpp ..
cp msm_cg.cpp ..
cp pppm.cpp ..
cp pppm_old.cpp ..
cp pppm_cg.cpp ..
cp pppm_disp.cpp ..
cp pppm_disp_tip4p.cpp ..
cp pppm_tip4p.cpp ..
cp pair_born_coul_long.cpp ..
cp pair_born_coul_msm.cpp ..
cp pair_buck_coul_long.cpp ..
cp pair_buck_coul_msm.cpp ..
cp pair_buck_long_coul_long.cpp ..
cp pair_coul_long.cpp ..
cp pair_coul_msm.cpp ..
cp pair_lj_charmm_coul_long.cpp ..
cp pair_lj_charmm_coul_msm.cpp ..
cp pair_lj_cut_coul_long.cpp ..
cp pair_lj_cut_coul_msm.cpp ..
cp pair_lj_cut_tip4p_long.cpp ..
cp pair_lj_long_coul_long.cpp ..
cp pair_lj_long_tip4p_long.cpp ..
cp fft3d.cpp ..
cp fft3d_wrap.cpp ..
cp remap.cpp ..
cp remap_wrap.cpp ..
cp commgrid.h ..
cp ewald.h ..
cp ewald_disp.h ..
cp msm.h ..
cp msm_cg.h ..
cp pppm.h ..
cp pppm_old.h ..
cp pppm_cg.h ..
cp pppm_disp.h ..
cp pppm_disp_tip4p.h ..
cp pppm_tip4p.h ..
cp pair_born_coul_long.h ..
cp pair_born_coul_msm.h ..
cp pair_buck_coul_long.h ..
cp pair_buck_coul_msm.h ..
cp pair_buck_long_coul_long.h ..
cp pair_coul_long.h ..
cp pair_coul_msm.h ..
cp pair_lj_charmm_coul_long.h ..
cp pair_lj_charmm_coul_msm.h ..
cp pair_lj_cut_coul_long.h ..
cp pair_lj_cut_coul_msm.h ..
cp pair_lj_cut_tip4p_long.h ..
cp pair_lj_long_coul_long.h ..
cp pair_lj_long_tip4p_long.h ..
cp fft3d.h ..
cp fft3d_wrap.h ..
cp remap.h ..
cp remap_wrap.h ..
cp kissfft.h ..
cp math_complex.h ..
cp math_vector.h ..
elif (test $1 = 0) then
rm -f ../commgrid.cpp
rm -f ../ewald.cpp
rm -f ../ewald_disp.cpp
rm -f ../msm.cpp
rm -f ../msm_cg.cpp
rm -f ../pppm.cpp
rm -f ../pppm_old.cpp
rm -f ../pppm_cg.cpp
rm -f ../pppm_disp.cpp
rm -f ../pppm_disp_tip4p.cpp
rm -f ../pppm_tip4p.cpp
rm -f ../pair_born_coul_long.cpp
rm -f ../pair_born_coul_msm.cpp
rm -f ../pair_buck_coul_long.cpp
rm -f ../pair_buck_coul_msm.cpp
rm -f ../pair_buck_long_coul_long.cpp
rm -f ../pair_coul_long.cpp
rm -f ../pair_coul_msm.cpp
rm -f ../pair_lj_charmm_coul_long.cpp
rm -f ../pair_lj_charmm_coul_msm.cpp
rm -f ../pair_lj_cut_coul_long.cpp
rm -f ../pair_lj_cut_coul_msm.cpp
rm -f ../pair_lj_cut_tip4p_long.cpp
rm -f ../pair_lj_long_coul_long.cpp
rm -f ../pair_lj_long_tip4p_long.cpp
rm -f ../fft3d.cpp
rm -f ../fft3d_wrap.cpp
rm -f ../remap.cpp
rm -f ../remap_wrap.cpp
rm -f ../commgrid.h
rm -f ../ewald.h
rm -f ../ewald_disp.h
rm -f ../msm.h
rm -f ../msm_cg.h
rm -f ../pppm.h
rm -f ../pppm_old.h
rm -f ../pppm_cg.h
rm -f ../pppm_disp.h
rm -f ../pppm_disp_tip4p.h
rm -f ../pppm_tip4p.h
rm -f ../pair_born_coul_long.h
rm -f ../pair_born_coul_msm.h
rm -f ../pair_buck_coul_long.h
rm -f ../pair_buck_coul_msm.h
rm -f ../pair_buck_long_coul_long.h
rm -f ../pair_coul_long.h
rm -f ../pair_coul_msm.h
rm -f ../pair_lj_charmm_coul_long.h
rm -f ../pair_lj_charmm_coul_msm.h
rm -f ../pair_lj_cut_coul_long.h
rm -f ../pair_lj_cut_coul_msm.h
rm -f ../pair_lj_cut_tip4p_long.h
rm -f ../pair_lj_long_coul_long.h
rm -f ../pair_lj_long_tip4p_long.h
rm -f ../fft3d.h
rm -f ../fft3d_wrap.h
rm -f ../remap.h
rm -f ../remap_wrap.h
rm -f ../kissfft.h
rm -f ../math_vector.h
rm -f ../math_complex.h
fi

View File

@ -1,67 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_qeq_comb.cpp ..
cp pair_adp.cpp ..
cp pair_airebo.cpp ..
cp pair_bop.cpp ..
cp pair_comb.cpp ..
cp pair_eam.cpp ..
cp pair_eam_alloy.cpp ..
cp pair_eam_fs.cpp ..
cp pair_eim.cpp ..
cp pair_lcbop.cpp ..
cp pair_rebo.cpp ..
cp pair_sw.cpp ..
cp pair_tersoff.cpp ..
cp pair_tersoff_zbl.cpp ..
cp fix_qeq_comb.h ..
cp pair_adp.h ..
cp pair_airebo.h ..
cp pair_bop.h ..
cp pair_comb.h ..
cp pair_eam.h ..
cp pair_eam_alloy.h ..
cp pair_eam_fs.h ..
cp pair_eim.h ..
cp pair_lcbop.h ..
cp pair_rebo.h ..
cp pair_sw.h ..
cp pair_tersoff.h ..
cp pair_tersoff_zbl.h ..
elif (test $1 = 0) then
rm -f ../fix_qeq_comb.cpp
rm -f ../pair_adp.cpp
rm -f ../pair_airebo.cpp
rm -f ../pair_bop.cpp
rm -f ../pair_comb.cpp
rm -f ../pair_eam.cpp
rm -f ../pair_eam_alloy.cpp
rm -f ../pair_eam_fs.cpp
rm -f ../pair_eim.cpp
rm -f ../pair_lcbop.cpp
rm -f ../pair_rebo.cpp
rm -f ../pair_sw.cpp
rm -f ../pair_tersoff.cpp
rm -f ../pair_tersoff_zbl.cpp
rm -f ../fix_qeq_comb.h
rm -f ../pair_adp.h
rm -f ../pair_airebo.h
rm -f ../pair_bop.h
rm -f ../pair_comb.h
rm -f ../pair_eam.h
rm -f ../pair_eam_alloy.h
rm -f ../pair_eam_fs.h
rm -f ../pair_eim.h
rm -f ../pair_lcbop.h
rm -f ../pair_rebo.h
rm -f ../pair_sw.h
rm -f ../pair_tersoff.h
rm -f ../pair_tersoff_zbl.h
fi

View File

@ -1,31 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_bond_break.cpp ..
cp fix_bond_create.cpp ..
cp fix_bond_swap.cpp ..
cp fix_gcmc.cpp ..
cp pair_dsmc.cpp ..
cp fix_bond_break.h ..
cp fix_bond_create.h ..
cp fix_bond_swap.h ..
cp fix_gcmc.h ..
cp pair_dsmc.h ..
elif (test $1 = 0) then
rm -f ../fix_bond_break.cpp
rm -f ../fix_bond_create.cpp
rm -f ../fix_bond_swap.cpp
rm -f ../fix_gcmc.cpp
rm -f ../pair_dsmc.cpp
rm -f ../fix_bond_break.h
rm -f ../fix_bond_create.h
rm -f ../fix_bond_swap.h
rm -f ../fix_gcmc.h
rm -f ../pair_dsmc.h
fi

View File

@ -1,135 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp angle_charmm.cpp ..
cp angle_cosine.cpp ..
cp angle_cosine_delta.cpp ..
cp angle_cosine_periodic.cpp ..
cp angle_cosine_squared.cpp ..
cp angle_harmonic.cpp ..
cp angle_table.cpp ..
cp atom_vec_angle.cpp ..
cp atom_vec_bond.cpp ..
cp atom_vec_full.cpp ..
cp atom_vec_molecular.cpp ..
cp bond_fene.cpp ..
cp bond_fene_expand.cpp ..
cp bond_harmonic.cpp ..
cp bond_morse.cpp ..
cp bond_nonlinear.cpp ..
cp bond_quartic.cpp ..
cp bond_table.cpp ..
cp dihedral_charmm.cpp ..
cp dihedral_harmonic.cpp ..
cp dihedral_helix.cpp ..
cp dihedral_multi_harmonic.cpp ..
cp dihedral_opls.cpp ..
cp improper_cvff.cpp ..
cp improper_harmonic.cpp ..
cp improper_umbrella.cpp ..
cp pair_hbond_dreiding_lj.cpp ..
cp pair_hbond_dreiding_morse.cpp ..
cp pair_lj_charmm_coul_charmm.cpp ..
cp pair_lj_charmm_coul_charmm_implicit.cpp ..
cp pair_lj_cut_tip4p_cut.cpp ..
cp angle_charmm.h ..
cp angle_cosine.h ..
cp angle_cosine_delta.h ..
cp angle_cosine_periodic.h ..
cp angle_cosine_squared.h ..
cp angle_harmonic.h ..
cp angle_table.h ..
cp atom_vec_angle.h ..
cp atom_vec_bond.h ..
cp atom_vec_full.h ..
cp atom_vec_molecular.h ..
cp bond_fene.h ..
cp bond_fene_expand.h ..
cp bond_harmonic.h ..
cp bond_morse.h ..
cp bond_nonlinear.h ..
cp bond_quartic.h ..
cp bond_table.h ..
cp dihedral_charmm.h ..
cp dihedral_harmonic.h ..
cp dihedral_helix.h ..
cp dihedral_multi_harmonic.h ..
cp dihedral_opls.h ..
cp improper_cvff.h ..
cp improper_harmonic.h ..
cp improper_umbrella.h ..
cp pair_hbond_dreiding_lj.h ..
cp pair_hbond_dreiding_morse.h ..
cp pair_lj_charmm_coul_charmm.h ..
cp pair_lj_charmm_coul_charmm_implicit.h ..
cp pair_lj_cut_tip4p_cut.h ..
elif (test $1 = 0) then
rm -f ../angle_charmm.cpp
rm -f ../angle_cosine.cpp
rm -f ../angle_cosine_delta.cpp
rm -f ../angle_cosine_periodic.cpp
rm -f ../angle_cosine_squared.cpp
rm -f ../angle_harmonic.cpp
rm -f ../angle_table.cpp
rm -f ../atom_vec_angle.cpp
rm -f ../atom_vec_bond.cpp
rm -f ../atom_vec_full.cpp
rm -f ../atom_vec_molecular.cpp
rm -f ../bond_fene.cpp
rm -f ../bond_fene_expand.cpp
rm -f ../bond_harmonic.cpp
rm -f ../bond_morse.cpp
rm -f ../bond_nonlinear.cpp
rm -f ../bond_quartic.cpp
rm -f ../bond_table.cpp
rm -f ../dihedral_charmm.cpp
rm -f ../dihedral_harmonic.cpp
rm -f ../dihedral_helix.cpp
rm -f ../dihedral_multi_harmonic.cpp
rm -f ../dihedral_opls.cpp
rm -f ../improper_cvff.cpp
rm -f ../improper_harmonic.cpp
rm -f ../improper_umbrella.cpp
rm -f ../pair_hbond_dreiding_lj.cpp
rm -f ../pair_hbond_dreiding_morse.cpp
rm -f ../pair_lj_charmm_coul_charmm.cpp
rm -f ../pair_lj_charmm_coul_charmm_implicit.cpp
rm -f ../pair_lj_cut_tip4p_cut.cpp
rm -f ../angle_charmm.h
rm -f ../angle_cosine.h
rm -f ../angle_cosine_delta.h
rm -f ../angle_cosine_periodic.h
rm -f ../angle_cosine_squared.h
rm -f ../angle_harmonic.h
rm -f ../angle_table.h
rm -f ../atom_vec_angle.h
rm -f ../atom_vec_bond.h
rm -f ../atom_vec_full.h
rm -f ../atom_vec_molecular.h
rm -f ../bond_fene.h
rm -f ../bond_fene_expand.h
rm -f ../bond_harmonic.h
rm -f ../bond_morse.h
rm -f ../bond_nonlinear.h
rm -f ../bond_quartic.h
rm -f ../bond_table.h
rm -f ../dihedral_charmm.h
rm -f ../dihedral_harmonic.h
rm -f ../dihedral_helix.h
rm -f ../dihedral_multi_harmonic.h
rm -f ../dihedral_opls.h
rm -f ../improper_cvff.h
rm -f ../improper_harmonic.h
rm -f ../improper_umbrella.h
rm -f ../pair_hbond_dreiding_lj.h
rm -f ../pair_hbond_dreiding_morse.h
rm -f ../pair_lj_charmm_coul_charmm.h
rm -f ../pair_lj_charmm_coul_charmm_implicit.h
rm -f ../pair_lj_cut_tip4p_cut.h
fi

View File

@ -191,19 +191,27 @@ yes-%:
then cp Makefile.package.settings.empty Makefile.package.settings; fi
@if [ ! -e $(YESDIR) ]; then \
echo "Package $(@:yes-%=%) does not exist"; \
else \
elif [ -e $(YESDIR)/Install.sh ]; then \
echo "Installing package $(@:yes-%=%)"; \
cd $(YESDIR); $(SHELL) Install.sh 1; cd ..; \
$(SHELL) Depend.sh $(YESDIR) 1; \
else \
echo "Installing package $(@:yes-%=%)"; \
cd $(YESDIR); $(SHELL) ../Install.sh 1; cd ..; \
$(SHELL) Depend.sh $(YESDIR) 1; \
fi;
no-%:
@if [ ! -e $(NODIR) ]; then \
echo "Package $(@:no-%=%) does not exist"; \
else \
elif [ -e $(NODIR)/Install.sh ]; then \
echo "Uninstalling package $(@:no-%=%)"; \
cd $(NODIR); $(SHELL) Install.sh 0; cd ..; \
$(SHELL) Depend.sh $(NODIR) 0; \
else \
echo "Uninstalling package $(@:no-%=%)"; \
cd $(NODIR); $(SHELL) ../Install.sh 0; cd ..; \
$(SHELL) Depend.sh $(NODIR) 0; \
fi;
# status = list src files that differ from package files

View File

@ -1,31 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp atom_vec_peri.cpp ..
cp pair_peri_pmb.cpp ..
cp pair_peri_lps.cpp ..
cp fix_peri_neigh.cpp ..
cp compute_damage_atom.cpp ..
cp atom_vec_peri.h ..
cp pair_peri_pmb.h ..
cp pair_peri_lps.h ..
cp fix_peri_neigh.h ..
cp compute_damage_atom.h ..
elif (test $1 = 0) then
rm -f -f ../atom_vec_peri.cpp
rm -f -f ../pair_peri_pmb.cpp
rm -f -f ../pair_peri_lps.cpp
rm -f -f ../fix_peri_neigh.cpp
rm -f -f ../compute_damage_atom.cpp
rm -f -f ../atom_vec_peri.h
rm -f -f ../pair_peri_pmb.h
rm -f -f ../pair_peri_lps.h
rm -f -f ../fix_peri_neigh.h
rm -f -f ../compute_damage_atom.h
fi

View File

@ -35,34 +35,21 @@ if (test $2 = "status") then
fi
# update, only if installed
# if package dir has its own Package.sh, use it
# cp package file to src if it exists and is different
# set installflag if any package file is not in src and do full install
# this is needed when a patch has added a new file to the package
# perform a re-install, but only if the package is already installed
elif (test $2 = "update") then
echo "Updating src files from $1 package files"
if (test $installed = 1) then
if (test ! -e Package.sh) then
installflag=0
for file in *.cpp *.h; do
if (test ! -e ../$file) then
installflag=1
elif (test "`diff --brief $file ../$file`" != "") then
echo " updating src/$file"
cp $file ..
fi
done
if (test $installflag = 1) then
echo " reinstalling package $1"
/bin/sh Install.sh 1
/bin/sh ../Depend.sh $1 1
fi
echo " re-installing package $1"
if (test -e Install.sh) then
cd $1; /bin/sh Install.sh 1; cd ..
else
/bin/sh Package.sh
cd $1; /bin/sh ../Install.sh 1; cd ..
fi
cd ..
/bin/sh Depend.sh $1 1
else
echo " $1 package is not installed, no action"
echo " $1 package is not installed"
fi
# overwrite, only if installed
@ -80,7 +67,7 @@ elif (test $2 = "overwrite") then
fi
done
else
echo " $1 package is not installed, no action"
echo " $1 package is not installed"
fi
# diff

View File

@ -1,51 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp compute_event_displace.cpp ..
cp fix_event.cpp ..
cp fix_event_prd.cpp ..
cp fix_event_tad.cpp ..
cp fix_neb.cpp ..
cp verlet_split.cpp ..
cp neb.cpp ..
cp prd.cpp ..
cp tad.cpp ..
cp temper.cpp ..
cp compute_event_displace.h ..
cp fix_event.h ..
cp fix_event_prd.h ..
cp fix_event_tad.h ..
cp fix_neb.h ..
cp verlet_split.h ..
cp neb.h ..
cp prd.h ..
cp tad.h ..
cp temper.h ..
elif (test $1 = 0) then
rm -f ../compute_event_displace.cpp
rm -f ../fix_event.cpp
rm -f ../fix_event_prd.cpp
rm -f ../fix_event_tad.cpp
rm -f ../fix_neb.cpp
rm -f ../verlet_split.cpp
rm -f ../neb.cpp
rm -f ../prd.cpp
rm -f ../tad.cpp
rm -f ../temper.cpp
rm -f ../compute_event_displace.h
rm -f ../fix_event.h
rm -f ../fix_event_prd.h
rm -f ../fix_event_tad.h
rm -f ../fix_neb.h
rm -f ../verlet_split.h
rm -f ../neb.h
rm -f ../prd.h
rm -f ../tad.h
rm -f ../temper.h
fi

View File

@ -1,40 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_rigid.cpp ..
cp fix_rigid_nh.cpp ..
cp fix_rigid_nph.cpp ..
cp fix_rigid_npt.cpp ..
cp fix_rigid_nve.cpp ..
cp fix_rigid_nvt.cpp ..
cp fix_rigid_small.cpp ..
cp fix_rigid.h ..
cp fix_rigid_nh.h ..
cp fix_rigid_nph.h ..
cp fix_rigid_npt.h ..
cp fix_rigid_nve.h ..
cp fix_rigid_nvt.h ..
cp fix_rigid_small.h ..
elif (test $1 = 0) then
rm -f ../fix_rigid.cpp
rm -f ../fix_rigid_nh.cpp
rm -f ../fix_rigid_nph.cpp
rm -f ../fix_rigid_npt.cpp
rm -f ../fix_rigid_nve.cpp
rm -f ../fix_rigid_nvt.cpp
rm -f ../fix_rigid_small.cpp
rm -f ../fix_rigid.h
rm -f ../fix_rigid_nh.h
rm -f ../fix_rigid_nph.h
rm -f ../fix_rigid_npt.h
rm -f ../fix_rigid_nve.h
rm -f ../fix_rigid_nvt.h
rm -f ../fix_rigid_small.h
fi

View File

@ -1,27 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_append_atoms.cpp ..
cp fix_msst.cpp ..
cp fix_nphug.cpp ..
cp fix_wall_piston.cpp ..
cp fix_append_atoms.h ..
cp fix_msst.h ..
cp fix_nphug.h ..
cp fix_wall_piston.h ..
elif (test $1 = 0) then
rm -f ../fix_append_atoms.cpp
rm -f ../fix_msst.cpp
rm -f ../fix_nphug.cpp
rm -f ../fix_wall_piston.cpp
rm -f ../fix_append_atoms.h
rm -f ../fix_msst.h
rm -f ../fix_nphug.h
rm -f ../fix_wall_piston.h
fi

View File

@ -1,19 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp fix_srd.cpp ..
cp fix_wall_srd.cpp ..
cp fix_srd.h ..
cp fix_wall_srd.h ..
elif (test $1 = 0) then
rm -f ../fix_srd.cpp
rm -f ../fix_wall_srd.cpp
rm -f ../fix_srd.h
rm -f ../fix_wall_srd.h
fi

View File

@ -1,21 +0,0 @@
# Install/unInstall package files in LAMMPS
if (test $1 = 1) then
cp dump_xtc.cpp ..
cp dump_xtc.h ..
cp xdr_compat.cpp ..
cp xdr_compat.h ..
elif (test $1 = 0) then
rm -f ../dump_xtc.cpp
rm -f ../dump_xtc.h
rm -f ../xdr_compat.cpp
rm -f ../xdr_compat.h
fi

View File

@ -43,7 +43,7 @@ using namespace MathConst;
#define MYROUND(a) (( a-floor(a) ) >= .5) ? ceil(a) : floor(a)
enum{INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,FILEVAR,EQUAL,ATOM};
enum{INDEX,LOOP,WORLD,UNIVERSE,ULOOP,STRING,FILEVAR,AFILEVAR,EQUAL,ATOM};
enum{ARG,OP};
// customize by adding a function
@ -288,10 +288,27 @@ void Variable::set(int narg, char **arg)
pad[nvar] = 0;
data[nvar] = new char*[num[nvar]];
data[nvar][0] = new char[MAXLINE];
reader[nvar] = new VarReader(lmp,arg[2]);
reader[nvar] = new VarReader(lmp,arg[2],FILEVAR);
int flag = reader[nvar]->read(data[nvar][0]);
if (flag) error->all(FLERR,"File variable could not read value");
// AFILEVAR for numbers
// which = 1st value
} else if (strcmp(arg[1],"afile") == 0) {
if (narg != 3) error->all(FLERR,"Illegal variable command");
if (find(arg[0]) >= 0) return;
if (nvar == maxvar) grow();
style[nvar] = AFILEVAR;
num[nvar] = 1;
which[nvar] = 0;
pad[nvar] = 0;
//data[nvar] = new char*[num[nvar]];
//data[nvar][0] = new char[MAXLINE];
reader[nvar] = new VarReader(lmp,arg[2],AFILEVAR);
int flag = reader[nvar]->read(data[nvar][0]);
if (flag) error->all(FLERR,"Afile variable could not read values");
// EQUAL
// remove pre-existing var if also style EQUAL (allows it to be reset)
// num = 2, which = 1st value
@ -3649,9 +3666,10 @@ unsigned int Variable::data_mask(char *str)
class to read variable values from a file, line by line
------------------------------------------------------------------------- */
VarReader::VarReader(LAMMPS *lmp, char *file) : Pointers(lmp)
VarReader::VarReader(LAMMPS *lmp, char *file, int flag) : Pointers(lmp)
{
MPI_Comm_rank(world,&me);
style = flag;
if (me == 0) {
fp = fopen(file,"r");
@ -3671,6 +3689,7 @@ VarReader::~VarReader()
}
/* ----------------------------------------------------------------------
read for FILEVAR style
read next value from file into str
strip comments, skip blank lines
return 0 if successful, 1 if end-of-file
@ -3699,3 +3718,11 @@ int VarReader::read(char *str)
MPI_Bcast(str,n,MPI_CHAR,0,world);
return 0;
}
/* ----------------------------------------------------------------------
read for AFILEVAR style
------------------------------------------------------------------------- */
int VarReader::read(double *)
{
}

View File

@ -47,7 +47,7 @@ class Variable : protected Pointers {
int *num; // # of values for each variable
int *which; // next available value for each variable
int *pad; // 1 = pad loop/uloop variables with 0s, 0 = no pad
class VarReader **reader; // variable that reads lines from file
class VarReader **reader; // variable that reads from file
char ***data; // str value of each variable's values
int *eval_in_progress; // flag if evaluation of variable is in progress
@ -96,12 +96,13 @@ class Variable : protected Pointers {
class VarReader : protected Pointers {
public:
VarReader(class LAMMPS *, char *);
VarReader(class LAMMPS *, char *, int);
~VarReader();
int read(char *);
int read(double *);
private:
int me;
int me,style;
FILE *fp;
};