How to create a new project in Yambo
Jump to navigation
Jump to search
1) Edit the file config/mk/targets.mk
In the following np stands for your new project. Choose two letters which will inequivocally identify your project. Example: "df" stands for "defects".
DF_PROJ = yambo_df ypp_df
2) Edit the file config/mk/actions/compile_yambo.mk and config/mk/actions/compile_ypp.mk by adding the new executables:
yambo_df: ext-libs @+LIBS2DO="$(INT_LIBS)"; DIR2GO="lib" ; VPATH="$(topdir)/lib" ; $(mk_internal_lib) @+LIBS2DO="$(YLIBDRIVER)"; NAME="yambo_df_driver_"; DIR2GO="lib/yambo/driver/src"; VPATH="$(topdir)/lib/yambo/driver/src";\ ADF="-D_DEFECTS -D_SC -D_yambo"; $(mk_external_yambo_lib) @+LIBS2DO="$(PJ_DFLIBS)"; XPATH="src"; VPATH="$(topdir)/src"; ADF="-D_DEFECTS -D_SC"; $(mk_src) @+X2DO="yambo_df"; XPATH="driver"; VPATH="$(topdir)/driver"; XLIBS="$(PJ_DFLIBS_LD)" ; DRILIBS="$(YLIBDRIVER_LD)"; \ ADF="-D_DEFECTS -D_SC"; $(mk_yambo)
ypp_df: ext-libs @+LIBS2DO="$(INT_LIBS)"; DIR2GO="lib" ; VPATH="$(topdir)/lib" ; $(mk_internal_lib) @+LIBS2DO="$(YLIBDRIVER)"; NAME="ypp_df_driver_"; DIR2GO="lib/yambo/driver/src"; VPATH="$(topdir)/lib/yambo/driver/src"; \ ADF="-D_DEFECTS -D_SC -D_ypp"; $(mk_external_yambo_lib) @+LIBS2DO="$(YPPDF_MAIN_LIBS)"; XPATH="src"; VPATH="$(topdir)/src"; ADF="-D_DEFECTS -D_SC "; $(mk_src) @+LIBS2DO="$(YPP_LIBS)"; XPATH="ypp"; VPATH="$(topdir)/ypp"; ADF="-D_YPP_DEFECTS"; $(mk_ypp_src) @+X2DO="ypp_df"; XPATH="driver"; VPATH="$(topdir)/driver"; XLIBS="$(YPPDF_MAIN_LIBS_LD)"; \ X_ypp_LIBS="$(YPP_LIBS_LD)"; DRILIBS="$(YLIBDRIVER_LD)"; ADF="-D_YPP_DEFECTS"; $(mk_ypp)
3) Edit the file config/mk/libraries.mk by adding
YPPDF_MAIN_LIBS = $(YPP_MAIN_LIBS) collisions hamiltonian sc YPPDF_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) collisions hamiltonian sc
4) Edit the file driver/.objects
objs = yambo.o #if defined _ypp || _ypp_ph || _ypp_rt || _ypp_surf || _ypp_magnetic || _ypp_sc || _ypp_nl || _ypp_df objs = ypp.o #endif