diff --git a/544_update.patch b/544_update.patch new file mode 100644 index 0000000..ff979b3 --- /dev/null +++ b/544_update.patch @@ -0,0 +1,174 @@ +diff -bruN ./data/glade/lbandsapplet.glade ../p4vasp_mod/data/glade/lbandsapplet.glade +--- ./data/glade/lbandsapplet.glade 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/data/glade/lbandsapplet.glade 2019-06-28 20:40:39.000000000 +0800 +@@ -444,14 +444,14 @@ + + + GtkCheckButton +- dx2 ++ x2-y2 + True + + toggled + on_d_toggled + Wed, 04 Dec 2002 15:42:50 GMT + +- ++ + True + True + +diff -bruN ./data/glade/ldosapplet.glade ../p4vasp_mod/data/glade/ldosapplet.glade +--- ./data/glade/ldosapplet.glade 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/data/glade/ldosapplet.glade 2019-06-28 20:40:21.000000000 +0800 +@@ -511,14 +511,14 @@ + + + GtkCheckButton +- dx2 ++ x2-y2 + True + + toggled + on_d_toggled + Wed, 04 Dec 2002 15:42:50 GMT + +- ++ + True + True + +diff -bruN ./data/glade2/elcontrolapplet.glade ../p4vasp_mod/data/glade2/elcontrolapplet.glade +--- ./data/glade2/elcontrolapplet.glade 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/data/glade2/elcontrolapplet.glade 2019-06-28 20:41:13.000000000 +0800 +@@ -695,10 +695,10 @@ + + + +- ++ + True + True +- dx2 ++ x2-y2 + True + GTK_RELIEF_NORMAL + True +diff -bruN ./data/glade2/lbandsapplet.glade ../p4vasp_mod/data/glade2/lbandsapplet.glade +--- ./data/glade2/lbandsapplet.glade 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/data/glade2/lbandsapplet.glade 2019-06-28 20:41:28.000000000 +0800 +@@ -409,10 +409,10 @@ + + + +- ++ + True + True +- dx2 ++ x2-y2 + True + GTK_RELIEF_NORMAL + True +diff -bruN ./data/glade2/ldosapplet.glade ../p4vasp_mod/data/glade2/ldosapplet.glade +--- ./data/glade2/ldosapplet.glade 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/data/glade2/ldosapplet.glade 2019-06-28 20:40:54.000000000 +0800 +@@ -454,10 +454,10 @@ + + + +- ++ + True + True +- dx2 ++ x2-y2 + True + GTK_RELIEF_NORMAL + True +diff -bruN ./doc/api/python/p4vasp.SQLSystemPM-pysrc.html ../p4vasp_mod/doc/api/python/p4vasp.SQLSystemPM-pysrc.html +--- ./doc/api/python/p4vasp.SQLSystemPM-pysrc.html 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/doc/api/python/p4vasp.SQLSystemPM-pysrc.html 2019-06-28 20:42:17.000000000 +0800 +@@ -1143,7 +1143,7 @@ + 226 spins.sort() + 227 if spins[0]<0: + 228 spins.reverse() +-229 sorbitals=map(intern,["s","p","px","py","pz","d","dxy","dyz","dxz","dz2","dx2","f", ++229 sorbitals=map(intern,["s","p","px","py","pz","d","dxy","dyz","dxz","dz2","x2-y2","f", + 230 "f1","f2","f3","f4","f5","f6","f7"]) + 231 for x in orbitals[:]: + 232 if x not in sorbitals: +diff -bruN ./doc/api/python/p4vasp.applet.ElectronicApplet-module.html ../p4vasp_mod/doc/api/python/p4vasp.applet.ElectronicApplet-module.html +--- ./doc/api/python/p4vasp.applet.ElectronicApplet-module.html 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/doc/api/python/p4vasp.applet.ElectronicApplet-module.html 2019-06-28 20:41:57.000000000 +0800 +@@ -115,7 +115,7 @@ + +   + +- orbitals = orbitals = map(intern, ["s", "px", "py", "pz", "dxy", "dyz", "... + + +@@ -130,7 +130,7 @@ + +   + +- orbitals_d = map(intern, ["dxy", "dyz", "dxz", "dz2", "dx2"]) ++ orbitals_d = map(intern, ["dxy", "dyz", "dxz", "dz2", "x2-y2"]) + + + +@@ -186,7 +186,7 @@ +
+
Value:
+
+-map(intern, ["s", "px", "py", "pz", "dxy", "dyz", "dxz", "dz2", "dx2",\
++map(intern, ["s", "px", "py", "pz", "dxy", "dyz", "dxz", "dz2", "x2-y2",\
+  "f1", "f2", "f3", "f4", "f5", "f6", "f7"])
+ 
+
+diff -bruN ./doc/api/python/p4vasp.applet.ElectronicApplet-pysrc.html ../p4vasp_mod/doc/api/python/p4vasp.applet.ElectronicApplet-pysrc.html +--- ./doc/api/python/p4vasp.applet.ElectronicApplet-pysrc.html 2019-06-28 20:51:04.000000000 +0800 ++++ ../p4vasp_mod/doc/api/python/p4vasp.applet.ElectronicApplet-pysrc.html 2019-06-28 20:42:33.000000000 +0800 +@@ -100,10 +100,10 @@ + 32 import gtk + 33 + 34 +- 35 orbitals =map(intern,["s","px","py","pz","dxy","dyz","dxz","dz2","dx2", ++ 35 orbitals =map(intern,["s","px","py","pz","dxy","dyz","dxz","dz2","x2-y2", + 36 "f1","f2","f3","f4","f5","f6","f7"]) + 37 orbitals_p=map(intern,["px","py","pz"]) +- 38 orbitals_d=map(intern,["dxy","dyz","dxz","dz2","dx2"]) ++ 38 orbitals_d=map(intern,["dxy","dyz","dxz","dz2","x2-y2"]) + 39 orbitals_f=map(intern,["f1","f2","f3","f4","f5","f6","f7"]) + 40 +
41 -class Line: +diff -bruN ./lib/p4vasp/SQLSystemPM.py ../p4vasp_mod/lib/p4vasp/SQLSystemPM.py +--- ./lib/p4vasp/SQLSystemPM.py 2019-06-28 20:51:03.000000000 +0800 ++++ ../p4vasp_mod/lib/p4vasp/SQLSystemPM.py 2019-06-28 20:42:50.000000000 +0800 +@@ -226,7 +226,7 @@ + spins.sort() + if spins[0]<0: + spins.reverse() +- sorbitals=map(intern,["s","p","px","py","pz","d","dxy","dyz","dxz","dz2","dx2","f", ++ sorbitals=map(intern,["s","p","px","py","pz","d","dxy","dyz","dxz","dz2","x2-y2","f", + "f1","f2","f3","f4","f5","f6","f7"]) + for x in orbitals[:]: + if x not in sorbitals: +diff -bruN ./lib/p4vasp/applet/ElectronicApplet.py ../p4vasp_mod/lib/p4vasp/applet/ElectronicApplet.py +--- ./lib/p4vasp/applet/ElectronicApplet.py 2019-06-28 20:51:03.000000000 +0800 ++++ ../p4vasp_mod/lib/p4vasp/applet/ElectronicApplet.py 2019-06-28 20:43:03.000000000 +0800 +@@ -32,10 +32,10 @@ + import gtk + + +-orbitals =map(intern,["s","px","py","pz","dxy","dyz","dxz","dz2","dx2", ++orbitals =map(intern,["s","px","py","pz","dxy","dyz","dxz","dz2","x2-y2", + "f1","f2","f3","f4","f5","f6","f7"]) + orbitals_p=map(intern,["px","py","pz"]) +-orbitals_d=map(intern,["dxy","dyz","dxz","dz2","dx2"]) ++orbitals_d=map(intern,["dxy","dyz","dxz","dz2","x2-y2"]) + orbitals_f=map(intern,["f1","f2","f3","f4","f5","f6","f7"]) + + class Line: diff --git a/MacOS.patch b/MacOS.patch deleted file mode 100644 index 8cc4d30..0000000 --- a/MacOS.patch +++ /dev/null @@ -1,269 +0,0 @@ -Only in ./src/: MacOS.patch -diff -c -r ./src/VisDrawer.cpp ../p4vasp-0.3.31/src/VisDrawer.cpp -*** ./src/VisDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisDrawer.cpp Thu Apr 26 16:30:44 2018 -*************** -*** 25,31 **** - #include - #include - #include -! #include - - const char *VisDrawer::getClassName(){return "VisDrawer";} - ---- 25,31 ---- - #include - #include - #include -! #include - - const char *VisDrawer::getClassName(){return "VisDrawer";} - -diff -c -r ./src/VisIsosurfaceDrawer.cpp ../p4vasp-0.3.31/src/VisIsosurfaceDrawer.cpp -*** ./src/VisIsosurfaceDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisIsosurfaceDrawer.cpp Thu Apr 26 16:32:32 2018 -*************** -*** 24,30 **** - #include - #include - #include -! #include - #include - #include - #include ---- 24,30 ---- - #include - #include - #include -! #include - #include - #include - #include -diff -c -r ./src/VisMain.cpp ../p4vasp-0.3.31/src/VisMain.cpp -*** ./src/VisMain.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisMain.cpp Thu Apr 26 16:30:26 2018 -*************** -*** 28,34 **** - #include - #include - #include -! #include - #include - - THREAD(Vis_thread); ---- 28,34 ---- - #include - #include - #include -! #include - #include - - THREAD(Vis_thread); -diff -c -r ./src/VisNavDrawer.cpp ../p4vasp-0.3.31/src/VisNavDrawer.cpp -*** ./src/VisNavDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisNavDrawer.cpp Thu Apr 26 16:31:02 2018 -*************** -*** 24,30 **** - #include - #include - #include -! #include - #include - #include - ---- 24,30 ---- - #include - #include - #include -! #include - #include - #include - -diff -c -r ./src/VisPrimitiveDrawer.cpp ../p4vasp-0.3.31/src/VisPrimitiveDrawer.cpp -*** ./src/VisPrimitiveDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisPrimitiveDrawer.cpp Thu Apr 26 16:32:47 2018 -*************** -*** 24,30 **** - #include - #include - #include -! #include - #include - #include - ---- 24,30 ---- - #include - #include - #include -! #include - #include - #include - -diff -c -r ./src/VisStructureArrowsDrawer.cpp ../p4vasp-0.3.31/src/VisStructureArrowsDrawer.cpp -*** ./src/VisStructureArrowsDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisStructureArrowsDrawer.cpp Thu Apr 26 16:32:01 2018 -*************** -*** 24,30 **** - #include - #include - #include -! #include - #include - #include - #include ---- 24,30 ---- - #include - #include - #include -! #include - #include - #include - #include -diff -c -r ./src/VisStructureDrawer.cpp ../p4vasp-0.3.31/src/VisStructureDrawer.cpp -*** ./src/VisStructureDrawer.cpp Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/VisStructureDrawer.cpp Thu Apr 26 16:31:25 2018 -*************** -*** 24,30 **** - #include - #include - #include -! #include - #include - #include - #include ---- 24,30 ---- - #include - #include - #include -! #include - #include - #include - #include -Only in ./src/: cp4vasp.pyc -diff -c -r ./src/fltk-config.py ../p4vasp-0.3.31/src/fltk-config.py -*** ./src/fltk-config.py Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/fltk-config.py Thu Apr 26 16:39:11 2018 -*************** -*** 9,18 **** - os.system("%s >fltk-config.tmp"%cmd) - return open("fltk-config.tmp").read() - -! if 0 and strip(run("fltk-config --version")) in ["1.1.5","1.1.6","1.1.7","1.1.8"]: -! print run("fltk-config "+" ".join(sys.argv[1:])) -! else: -! if not os.path.exists("../ext/bin/fltk-config"): -! os.system("cd ../ext; bash build-fltk.sh >build-fltk.log 2>build-fltk.err") -! print run("../ext/bin/fltk-config "+" ".join(sys.argv[1:])) - ---- 9,19 ---- - os.system("%s >fltk-config.tmp"%cmd) - return open("fltk-config.tmp").read() - -! print run("fltk-config "+" ".join(sys.argv[1:])) -! #if 0 and strip(run("fltk-config --version")) in ["1.1.5","1.1.6","1.1.7","1.1.8","1.3.4"]: -! # print run("fltk-config "+" ".join(sys.argv[1:])) -! #else: -! # if not os.path.exists("../ext/bin/fltk-config"): -! # os.system("cd ../ext; bash build-fltk.sh >build-fltk.log 2>build-fltk.err") -! # print run("../ext/bin/fltk-config "+" ".join(sys.argv[1:])) - -diff -c -r ./src/include/p4vasp/VisFLWindow.h ../p4vasp-0.3.31/src/include/p4vasp/VisFLWindow.h -*** ./src/include/p4vasp/VisFLWindow.h Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/include/p4vasp/VisFLWindow.h Thu Apr 26 16:28:42 2018 -*************** -*** 25,31 **** - - #include - #include -! #include - #include "VisWindow.h" - - class VisFLWindow : public Fl_Gl_Window{ ---- 25,31 ---- - - #include - #include -! #include - #include "VisWindow.h" - - class VisFLWindow : public Fl_Gl_Window{ -diff -c -r ./src/include/p4vasp/VisIsosurfaceDrawer.h ../p4vasp-0.3.31/src/include/p4vasp/VisIsosurfaceDrawer.h -*** ./src/include/p4vasp/VisIsosurfaceDrawer.h Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/include/p4vasp/VisIsosurfaceDrawer.h Thu Apr 26 16:32:16 2018 -*************** -*** 26,32 **** - #include "Chgcar.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; ---- 26,32 ---- - #include "Chgcar.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; -diff -c -r ./src/include/p4vasp/VisPrimitiveDrawer.h ../p4vasp-0.3.31/src/include/p4vasp/VisPrimitiveDrawer.h -*** ./src/include/p4vasp/VisPrimitiveDrawer.h Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/include/p4vasp/VisPrimitiveDrawer.h Thu Apr 26 16:29:32 2018 -*************** -*** 25,31 **** - #include "VisDrawer.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; ---- 25,31 ---- - #include "VisDrawer.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; -diff -c -r ./src/include/p4vasp/VisStructureArrowsDrawer.h ../p4vasp-0.3.31/src/include/p4vasp/VisStructureArrowsDrawer.h -*** ./src/include/p4vasp/VisStructureArrowsDrawer.h Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/include/p4vasp/VisStructureArrowsDrawer.h Thu Apr 26 16:31:44 2018 -*************** -*** 26,32 **** - #include "VisStructureDrawer.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; ---- 26,32 ---- - #include "VisStructureDrawer.h" - #include "threads.h" - #include -! #include - - #ifndef VisWindow - class VisWindow; -diff -c -r ./src/include/p4vasp/VisStructureDrawer.h ../p4vasp-0.3.31/src/include/p4vasp/VisStructureDrawer.h -*** ./src/include/p4vasp/VisStructureDrawer.h Fri Apr 27 09:53:39 2018 ---- ../p4vasp-0.3.31/src/include/p4vasp/VisStructureDrawer.h Thu Apr 26 16:29:57 2018 -*************** -*** 25,31 **** - #include "VisPrimitiveDrawer.h" - #include "threads.h" - #include -! #include - #include "AtomInfo.h" - #include "Structure.h" - ---- 25,31 ---- - #include "VisPrimitiveDrawer.h" - #include "threads.h" - #include -! #include - #include "AtomInfo.h" - #include "Structure.h" - diff --git a/Makefile.MacOS b/Makefile.MacOS deleted file mode 100644 index 2f6f566..0000000 --- a/Makefile.MacOS +++ /dev/null @@ -1,249 +0,0 @@ -###################################################################### -# INSTALATION DIRECTORIES: # -###################################################################### -# ROOT - root directory (need not be set, just for testing) # -# P4VASP_HOME - home directory of p4vasp distribution # -# PYTHON_PATH - where th python-home is (usually /usr/lib/python) # -# SITE_PACKAGES - where python modules will go # -# (usually /usr/lib/python/site-packages) # -# INCLUDEDIR - where the headder-files will go # -# (usually /usr/include) # -# LIBDIR - where the development libraries will go # -# (usually /usr/lib) # -# BINDIR - where the executable will go (e.g. /usr/bin) # -###################################################################### - --include install/Configuration.mk - -P4VCONFIG = lib/p4vasp/config.py -VINFO = vinfo.py -SETENVIRONMENT= setenvironment.sh -P4V = p4v - -.PHONY: p4vasp -.PHONY: doc -.PHONY: clean_p4vasp -.PHONY: clean_odpdom -.PHONY: cleanall_doc -.PHONY: cleanall_p4vasp -.PHONY: cleanall_odpdom -.PHONY: install_pythonpkg -.PHONY: install_gui -.PHONY: install_devel -.PHONY: install -.PHONY: uninstall_pythonpkg -.PHONY: uninstall_gui -.PHONY: uninstall_devel -.PHONY: uninstall -.PHONY: uninstallsh -.PHONY: p4vasp_config -.PHONY: setenvironment -.PHONY: launcher -.PHONY: appletlist - -all: p4vasp -local: - cd install && python configure.py local -config: - cd install && python configure.py -p4vasp: p4vasp_config uninstallsh appletlist - cd odpdom && $(MAKE) libODP.a - cd src && $(MAKE) -p4vasp_config: - echo "p4vasp_home='$(P4VASP_HOME)'" >$(P4VCONFIG) - cat $(VINFO) >> $(P4VCONFIG) -devver: - echo "name ='p4vasp-devel'" > $(VINFO) - echo "version ='DEVELOPMENT'" >> $(VINFO) - echo "release ='1'" >> $(VINFO) - echo "build_date ='`date`'" >> $(VINFO) -setenvironment: - echo "# set p4vasp environment variables" > $(SETENVIRONMENT) - echo "export PATH=\$$PATH:"$(BINDIR) >> $(SETENVIRONMENT) -launcher: - echo "#!`which sh`" >$(P4V) - echo "export LD_PRELOAD=libstdc++.so.6" >>$(P4V) - echo "export PYTHONPATH=\$$PYTHONPATH:"$(SITE_PACKAGES) >>$(P4V) - echo "#export APPMENU_DISPLAY_BOTH=1" >>$(P4V) - echo "export UBUNTU_MENUPROXY=0" >>$(P4V) - echo "export P4VASP_HOME="$(P4VASP_HOME) >> $(P4V) - echo "exec python "$(BINDIR)"/p4v.py \"\$$@\"" >>$(P4V) -appletlist: - cd install && python makeappletlist.py -bashrc:setenvironment - echo "" >> ~/.bashrc - cat $(SETENVIRONMENT) >> ~/.bashrc -fltk: - cd ext && sh build-fltk.sh -doc: - cd doc && $(MAKE) -clean_p4vasp: - rm -f data/glade/*.bak - rm -f data/glade2/*.bak - rm -f data/glade2/*.gladep - cd src && $(MAKE) clean -clean_odpdom: - cd odpdom && $(MAKE) clean -cleanall_doc: - cd doc && $(MAKE) cleanall -cleanall_p4vasp: - rm -f lib/p4vasp/config.py - rm -f lib/p4vasp/*.pyc - rm -f lib/p4vasp/*.pyo - rm -f lib/p4vasp/*.bak - rm -f lib/p4vasp/*~ - rm -f lib/p4vasp/paint3d/*.pyc - rm -f lib/p4vasp/paint3d/*.pyo - rm -f lib/p4vasp/paint3d/*.bak - rm -f lib/p4vasp/paint3d/*~ - rm -f lib/p4vasp/export/*.pyc - rm -f lib/p4vasp/export/*.pyo - rm -f lib/p4vasp/export/*.bak - rm -f lib/p4vasp/export/*~ - rm -f lib/p4vasp/applet/*.pyc - rm -f lib/p4vasp/applet/*.pyo - rm -f lib/p4vasp/applet/*.bak - rm -f lib/p4vasp/applet/*~ - rm -f lib/p4vasp/applet/appletlist.py - rm -f lib/p4vasp/piddle/*.pyc - rm -f lib/p4vasp/piddle/*.pyo - rm -f lib/p4vasp/piddle/*.bak - rm -f lib/p4vasp/piddle/*~ - rm -f lib/p4vasp/piddle/piddleGTKp4/*.pyc - rm -f lib/p4vasp/piddle/piddleGTKp4/*.pyo - rm -f lib/p4vasp/piddle/piddleGTKp4/*.bak - rm -f lib/p4vasp/piddle/piddleGTKp4/*~ - rm -f lib/p4vasp/piddle/piddleGTK2p4/*.pyc - rm -f lib/p4vasp/piddle/piddleGTK2p4/*.pyo - rm -f lib/p4vasp/piddle/piddleGTK2p4/*.bak - rm -f lib/p4vasp/piddle/piddleGTK2p4/*~ - rm -f test/*.pyc - rm -f test/*.pyo - rm -f test/*.bak - rm -f test/*~ - rm -f utils/*.pyc - rm -f utils/*.pyo - rm -f utils/*.bak - rm -f utils/*~ - rm -f install/*.pyc - rm -f install/*.pyo - rm -f install/*.bak - rm -f install/*~ - rm -f log - rm -f p4vasp.log - rm -f p4v - rm -f install/Configuration.mk - rm -f *~ - rm -f *.pyc - rm -f *.pyo - rm -f *.bak - cd src && $(MAKE) cleanall -cleanall_odpdom: - cd odpdom && $(MAKE) cleanall -cleanall_ext: - cd ext && sh clean.sh - -clean: clean_p4vasp clean_odpdom -cleanall: cleanall_p4vasp cleanall_odpdom cleanall_doc cleanall_ext - -install_pythonpkg:p4vasp - mkdir -p $(SITE_PACKAGES)/p4vasp - cd lib; cp -R p4vasp $(SITE_PACKAGES); cd .. - chmod -R 755 $(SITE_PACKAGES)/p4vasp - chmod 644 $(SITE_PACKAGES)/p4vasp/* - chmod -R 755 $(SITE_PACKAGES)/p4vasp/applet - chmod -R 644 $(SITE_PACKAGES)/p4vasp/applet/* - chmod -R 755 $(SITE_PACKAGES)/p4vasp/paint3d - chmod -R 644 $(SITE_PACKAGES)/p4vasp/paint3d/* - chmod -R 755 $(SITE_PACKAGES)/p4vasp/export - chmod -R 644 $(SITE_PACKAGES)/p4vasp/export/* - chmod -R 755 $(SITE_PACKAGES)/p4vasp/piddle - cd src; install -m755 cp4vasp.py _cp4vasp.so $(SITE_PACKAGES); cd .. - -install_gui:install_pythonpkg uninstallsh launcher - mkdir -p $(P4VASP_HOME) - cp -R data $(P4VASP_HOME) - cp -R utils $(P4VASP_HOME) - chmod -R 755 $(P4VASP_HOME)/data - chmod 644 $(P4VASP_HOME)/data/* - chmod 755 $(P4VASP_HOME)/data/glade - chmod 644 $(P4VASP_HOME)/data/glade/* - chmod 755 $(P4VASP_HOME)/data/glade/pixmaps - chmod 644 $(P4VASP_HOME)/data/glade/pixmaps/* - chmod 755 $(P4VASP_HOME)/data/glade2 - chmod 644 $(P4VASP_HOME)/data/glade2/* - chmod 755 $(P4VASP_HOME)/data/glade2/pixmaps - chmod 644 $(P4VASP_HOME)/data/glade2/pixmaps/* - chmod 755 $(P4VASP_HOME)/data/graphs - chmod 644 $(P4VASP_HOME)/data/graphs/* - chmod 755 $(P4VASP_HOME)/data/images - chmod 644 $(P4VASP_HOME)/data/images/* - chmod 755 $(P4VASP_HOME)/data/database - chmod 644 $(P4VASP_HOME)/data/database/* - chmod -R 755 $(P4VASP_HOME)/utils - - install -m755 uninstall.sh $(P4VASP_HOME)/uninstall.sh - install -m755 diagnostic.py $(P4VASP_HOME)/diagnostic.py - - install -m644 BUGS FAQS LICENSE README $(P4VASP_HOME) - mkdir -p $(BINDIR) - install -d -m755 $(BINDIR) - install -m755 p4v.py $(BINDIR)/p4v.py - install -m755 $(P4V) $(BINDIR)/$(P4V) - -install_doc: - mkdir -p $(P4VASP_HOME) - cp -R doc $(P4VASP_HOME) - chmod -R 755 $(P4VASP_HOME)/doc - chmod 644 $(P4VASP_HOME)/doc/* - chmod -R 755 $(P4VASP_HOME)/doc/api - chmod 644 $(P4VASP_HOME)/doc/api/* - chmod -R 755 $(P4VASP_HOME)/doc/api/c - chmod -R 755 $(P4VASP_HOME)/doc/api/python - chmod -R 755 $(P4VASP_HOME)/doc/intro - chmod 644 $(P4VASP_HOME)/doc/intro/* - -install_devel:install_pythonpkg - mkdir -p $(LIBDIR) - mkdir -p $(INCLUDEDIR)/ODP - mkdir -p $(INCLUDEDIR)/p4vasp - cp -R odpdom/include/ODP $(INCLUDEDIR) - cp -R src/include/p4vasp $(INCLUDEDIR) - chmod 755 $(INCLUDEDIR)/ODP - chmod 755 $(INCLUDEDIR)/p4vasp - chmod 644 $(INCLUDEDIR)/ODP/* - chmod 644 $(INCLUDEDIR)/p4vasp/* - cp src/libp4vasp.a $(LIBDIR) - chmod 644 $(LIBDIR)/libp4vasp.a - cp odpdom/libODP.a $(LIBDIR) - chmod 644 $(LIBDIR)/libODP.a -install:install_gui install_devel - -uninstallsh: - echo "#!/bin/sh" >uninstall.sh - echo "rm -Rf $(SITE_PACKAGES)/p4vasp" >>uninstall.sh - echo "rm -Rf $(SITE_PACKAGES)/cp4vasp.py" >>uninstall.sh - echo "rm -Rf $(SITE_PACKAGES)/_cp4vasp.so" >>uninstall.sh - echo "rm -f $(BINDIR)/p4v.py" >>uninstall.sh - echo "rm -f $(BINDIR)/p4v" >>uninstall.sh - echo "rm -Rf $(INCLUDEDIR)/ODP" >>uninstall.sh - echo "rm -Rf $(INCLUDEDIR)/p4vasp" >>uninstall.sh - echo "rm -Rf $(LIBDIR)/libp4vasp.a " >>uninstall.sh - echo "rm -Rf $(LIBDIR)/libODP.a" >>uninstall.sh - echo "rm -Rf $(P4VASP_HOME)" >>uninstall.sh -uninstall_pythonpkg: - rm -Rf $(SITE_PACKAGES)/p4vasp - rm -Rf $(SITE_PACKAGES)/cp4vasp.py - rm -Rf $(SITE_PACKAGES)/_cp4vasp.so - -uninstall_gui: - rm -Rf $(P4VASP_HOME) - rm -f $(BINDIR)/p4v.py - rm -f $(BINDIR)/p4v - -uninstall_devel: - rm -Rf $(INCLUDEDIR)/ODP - rm -Rf $(INCLUDEDIR)/p4vasp - rm -Rf $(LIBDIR)/libp4vasp.a - rm -Rf $(LIBDIR)/libODP.a -uninstall:uninstall_gui uninstall_devel uninstall_pythonpkg diff --git a/README b/README index 73ce374..adb48df 100644 --- a/README +++ b/README @@ -41,6 +41,8 @@ Installation (local) You can do it with the uninstall.sh residing in the P4VASP_HOME directory. 3) Unpack the file: tar -xvzf p4vasp-x.x.x.tgz 4) Change directory: cd p4vasp-x.x.x +__OPTIONAL__: Apply patch for VASP [v5.4.4+]: + patch -p0 < 544_update.patch 5) Configure: make local 6) check and adjust the paths in install/Configuration.mk @@ -59,6 +61,8 @@ Installation (global) sudo bash /usr/lib/p4vasp/uninstall.sh 3) Unpack the file: tar -xvzf p4vasp-x.x.x.tgz 4) Change directory: cd p4vasp-x.x.x +__OPTIONAL__: Apply patch for VASP [v5.4.4+]: + patch -p0 < 544_update.patch 5) Configure: make config 6) install (as root): make install x) If something goes wrong @@ -70,28 +74,7 @@ x) If something goes wrong Installation (MacOs) -------------------------- -0) You will need X11 and the command-line tools for Xcode installed. - For Xquratz, visit: https://www.xquartz.org/ - For command-line tools: $ xcode-select --install - - -1) For FLTK installation, we use homebrew's fltk: - Install homebrew: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Install fltk: $ brew install fltk - -2) Install other necessary library: $ brew install python@2 pip gcc gtk+ pygtk —with-libglade && pip install pyopengl numpy - -3) Apply patch to the sourcefile: $ patch -p0 -i MacOS.patch - -5) Copy the Makefile.MacOS to Makefile in the p4vasp root directory and in the src - directory: - cp Makefile.MacOS Makefile - cp src/Makefile.MacOS src/Makefile - -6) Run make and install: - make local; make; make install - -7) The executable should located at ~/p4vasp/bin +Check out installation instructions - README_MacOS.md. @@ -120,4 +103,3 @@ odpdom/COPYING). This package as well may contain other packages (in ext directory) under various open-source licenses: fltk (www.fltk.org), sqlite (www.sqlite.org) and pysqlite (code.google.com/p/pysqlite). These packages are provided for convenience only to make the installation easier. - diff --git a/README.MacOS b/README.MacOS deleted file mode 100644 index 3062890..0000000 --- a/README.MacOS +++ /dev/null @@ -1,28 +0,0 @@ -p4vasp compillation in MacOS: -(Tested on Mac OS 10.13.4, all updates installed.) - -0) You will need X11 and the command-line tools for Xcode installed. - For Xquratz, visit: https://www.xquartz.org/ - For command-line tools: $ xcode-select --install - - -1) For FLTK installation, we use homebrew's fltk: - Install homebrew: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Install fltk: $ brew install fltk - -2) Install other necessary library: $ brew install python@2 pip gcc gtk+ pygtk —with-libglade && pip install pyopengl numpy - -3) Apply patch to the sourcefile: $ patch -p0 -i MacOS.patch - -5) Copy the Makefile.MacOS to Makefile in the p4vasp root directory and in the src - directory: - $ cp Makefile.MacOS Makefile - $ cp odpdom/Makefile.MacOS odpdom/Makefile - $ cp src/Makefile.MacOS src/Makefile - -6) Run make and install: - make local && make && make install - -7) The executable should located at ~/p4vasp/bin - - diff --git a/README.md b/README.md index d771c1b..32e0a0e 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ Installation (local) ``` $ cd p4vasp-x.x.x ``` + +__OPTIONAL__: Apply patch for VASP [v5.4.4+]: +``` +patch -p0 < 544_update.patch +``` + 5) Configure: ``` $ make local @@ -79,6 +85,12 @@ Installation (global) ``` $ cd p4vasp-x.x.x ``` + +__OPTIONAL__: Apply patch for VASP [v5.4.4+]: +``` +patch -p0 < 544_update.patch +``` + 5) Configure: ``` $ make config @@ -94,46 +106,10 @@ Installation (global) -Installation (MacOS) +Installation (macOS) -------------------------- -1) You will need X11 and the command-line tools for Xcode. - For Xquratz(X11), visit [their website](https://www.xquartz.org/) - For command-line tools: -``` - $ xcode-select --install -``` - -2) For FLTK installation, we use homebrew's fltk: - Install homebrew: -``` - $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -``` - Install fltk: -``` - $ brew install fltk -``` - -3) Install other necessary library: -``` - $ brew install python@2 pip gcc gtk+ pygtk —with-libglade && pip install pyopengl numpy -``` -4) Apply patch to the sourcefile: -``` - $ patch -p0 -i MacOS.patch -``` -5) Copy the Makefile.MacOS to Makefile in the p4vasp root directory and in the `src` and `odpdom` directory: -``` - $ cp Makefile.MacOS Makefile - $ cp odpdom/Makefile.MacOS odpdom/Makefile - $ cp src/Makefile.MacOS src/Makefile -``` -6) Run make and install: -``` - $ make local && make && make install -``` -7) The executable should located at `~/p4vasp/bin` - +Check out [installation instructions](README_MacOS.md). Starting: @@ -160,5 +136,3 @@ odpdom/COPYING). This package as well may contain other packages (in ext directory) under various open-source licenses: [fltk](www.fltk.org), [sqlite](www.sqlite.org) and [pysqlite](code.google.com/p/pysqlite). These packages are provided for convenience only to make the installation easier. - - diff --git a/README_MacOS.md b/README_MacOS.md new file mode 100644 index 0000000..129e96d --- /dev/null +++ b/README_MacOS.md @@ -0,0 +1,54 @@ +p4vasp compillation in MacOS: +(Tested on macOS 11.1) + +0) Install Xcode command-line tools: +``` +xcode-select --install +``` + +1) Using [macports](https://www.macports.org/install.php) to install dependencies: +``` +sudo port install python27 +sudo port install py27-pip +sudo port install py27-gobject +sudo port install gettext +sudo port install py-pygtk +x11 +sudo port -v -s install fltk +``` +Also, as we are going to use clang(gcc) that comes with the command-line tools, if you have installed gcc via macports, deactivate it: +``` +sudo port select --set gcc none +``` + +2) Select our newly install python and pip as default: +``` +sudo port select --set pip pip27 +sudo port select --set python2 python27 +``` +Note that if you have a virtual environment, deactivate it. + +3) Using pip to install: +``` +pip install pyopengl numpy +``` + +4) Apply patches: +``` +cp src/Makefile.MacOS src/Makefile +``` +__OPTIONAL__: apply patch for VASP v5.4.4 and up: +``` +patch -p0 < 544_update.patch +``` + +5) Compile p4vasp: +``` +make local +make +``` +__OPTIONAL__: change install dir by modify `install/Configuration.mk` file. + +6) Install p4vasp: +``` +make install +``` diff --git a/install/install-ubuntu-dependencies.sh b/install/install-ubuntu-dependencies.sh index 2b5d03e..b3e7a0e 100755 --- a/install/install-ubuntu-dependencies.sh +++ b/install/install-ubuntu-dependencies.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo apt-get install python-dev g++ libx11-dev mesa-common-dev libglu1-mesa-dev python-opengl python-numpy python-glade2 +sudo apt-get install python-dev g++ libx11-dev mesa-common-dev libglu1-mesa-dev python-opengl python-numpy python-glade2 libfltk1.3-dev # For documentation: sudo apt-get install python-epydoc doxygen diff --git a/odpdom/Makefile.MacOS b/odpdom/Makefile.MacOS deleted file mode 100644 index 9863730..0000000 --- a/odpdom/Makefile.MacOS +++ /dev/null @@ -1,56 +0,0 @@ -CPP = g++-7 -LD = g++-7 -LIBS = -LDFLAGS += -shared -L. -FLAGS = -DPY_DOMEXC_MODULE="\"xml.dom.\"" - -DCHECK=5 \ - -DVERBOSE=5 \ - -# -DNO_POS_CACHE -# -DNO_THROW - -PYINCLUDE=`python -c "import sys;import os.path;print os.path.join(sys.prefix,\"include\",\"python\"+sys.version[:3])"` -CFLAGS += -fpic -g $(FLAGS) -I$(PYINCLUDE) -Iinclude - -SWIGFLAGS = -python -c++ $(FLAGS) - -OBJECTS = string.o \ - markText.o \ - Exceptions.o \ - Node.o \ - NodeSequences.o \ - Document.o \ - CharacterNodes.o \ - Element.o \ - parse.o - -#SWIG = ../../SWIG-1.3.16/swig -I../../SWIG-1.3.16/Lib -I../../SWIG-1.3.16/Lib/python -SWIG = swig - -all: _cODP.so - -cODP_wrap.cpp: include/ODP/NodeSequences.h \ - include/ODP/CharacterNodes.h \ - include/ODP/Element.h include/ODP/Node.h \ - include/ODP/Document.h \ - include/ODP/parse.h \ - ODP.i - $(SWIG) $(SWIGFLAGS) -o cODP_wrap.cpp ODP.i - -_cODP.so : libODP.a cODP_wrap.o - $(LD) $(LDFLAGS) -o _cODP.so cODP_wrap.o -lODP $(LIBS) - -libODP.a: $(OBJECTS) - ar -r libODP.a $(OBJECTS) - ranlib libODP.a -%.o:%.cpp - $(CPP) $(CFLAGS) -c $< -o $@ - -cleanwrap: - -rm cODP_wrap.cpp -clean: - -rm *.o - -cleanall:clean - -rm *.so - -rm *.a diff --git a/src/MacOS.patch b/src/MacOS.patch deleted file mode 100644 index e69de29..0000000 diff --git a/src/Makefile.MacOS b/src/Makefile.MacOS index f04a7bd..b4068a8 100644 --- a/src/Makefile.MacOS +++ b/src/Makefile.MacOS @@ -1,7 +1,7 @@ -include Configuration.mk -CPP=g++-7 -LD=g++-7 +CPP=g++ +LD=g++ #CPP=icc #LD=icc @@ -65,7 +65,7 @@ cp4vasp_wrap.cpp: cp4vasp.i #_cp4vasp.so: $(PYLIBOBJECTS) # $(LD) $(LDFLAGS) -o _cp4vasp.so $(PYLIBOBJECTS) $(LIBS) _cp4vasp.so: libp4vasp.a cp4vasp_wrap.o - $(LD) $(LDFLAGS) -o _cp4vasp.so cp4vasp_wrap.o -lp4vasp $(LIBS) `python-config --ldflags` + $(LD) $(LDFLAGS) -o _cp4vasp.so cp4vasp_wrap.o -lp4vasp $(LIBS) -L/opt/local/lib `python2-config --ldflags` testprog1: testprog1.o libp4vasp.a $(LD) -o testprog1 testprog1.o -lp4vasp.a $(LIBS) diff --git a/src/fltk-config.py b/src/fltk-config.py index bddb82c..8486b76 100644 --- a/src/fltk-config.py +++ b/src/fltk-config.py @@ -9,7 +9,15 @@ def run(cmd): os.system("%s >fltk-config.tmp"%cmd) return open("fltk-config.tmp").read() -if 0 and strip(run("fltk-config --version")) in ["1.1.5","1.1.6","1.1.7","1.1.8"]: +# https://stackoverflow.com/questions/9877462/is-there-a-python-equivalent-to-the-which-command +def which(pgm): + path=os.getenv('PATH') + for p in path.split(os.path.pathsep): + p=os.path.join(p,pgm) + if os.path.exists(p) and os.access(p,os.X_OK): + return p + +if which('fltk-config')!=None and strip(run("fltk-config --version")) in ["1.3.4","1.3.5"]: print run("fltk-config "+" ".join(sys.argv[1:])) else: if not os.path.exists("../ext/bin/fltk-config"):