diff --git a/CMakeLists.txt b/CMakeLists.txt index d8da2cae..ad0fa883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,3 +279,61 @@ target_include_directories( $ ) + +############################################################################### +########################### Install Instructions ############################## +############################################################################### + +# Build output artifacts +if (WITH_OBJECT) + install( + TARGETS + "lib-${PROJECT_NAME}-static" + "lib-${PROJECT_NAME}-shared" + "${PROJECT_NAME}-exe" + EXPORT "${PROJECT_NAME}-targets" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) +else() + install( + TARGETS + "lib-${PROJECT_NAME}-static" + "${PROJECT_NAME}-exe" + EXPORT "${PROJECT_NAME}-targets" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) +endif() +install( + EXPORT + "${PROJECT_NAME}-targets" + NAMESPACE + "${PROJECT_NAME}::" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" +) +install( + DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) +install( + DIRECTORY + "${CMAKE_CURRENT_BINARY_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${module-dir}" +) +# Package license files +install( + FILES + "COPYING" + "COPYING.LESSER" + DESTINATION "${CMAKE_INSTALL_DATADIR}/licenses/${PROJECT_NAME}" +) + +############################################################################## +################################ Testing ##################################### +############################################################################## + diff --git a/src/algos/search_conformers.f90 b/src/algos/search_conformers.f90 index 09d34f16..b49cef6a 100644 --- a/src/algos/search_conformers.f90 +++ b/src/algos/search_conformers.f90 @@ -281,7 +281,7 @@ subroutine crest_multilevel_wrap(env,ensnam,level) end subroutine crest_multilevel_wrap !========================================================================================! -subroutine crest_multilevel_oloop(env,ensnam,multilevel) +subroutine crest_multilevel_oloop(env,ensnam,multilevel_in) !******************************************************* !* multilevel optimization loop. !* construct consecutive optimizations starting with @@ -297,18 +297,19 @@ subroutine crest_multilevel_oloop(env,ensnam,multilevel) implicit none type(systemdata) :: env character(len=*),intent(in) :: ensnam - logical,intent(in) :: multilevel(6) + logical,intent(in) :: multilevel_in(6) integer :: nat,nall real(wp),allocatable :: eread(:) real(wp),allocatable :: xyz(:,:,:) integer,allocatable :: at(:) logical :: dump,pr character(len=128) :: inpnam,outnam - integer :: i,l + integer :: i,l,k real(wp) :: ewinbackup,rthrbackup real(wp) :: hlowbackup integer :: microbackup integer :: optlevelbackup + logical :: multilevel(6) interface subroutine crest_refine(env,input,output) @@ -327,6 +328,15 @@ end subroutine crest_refine hlowbackup = env%calc%hlow_opt microbackup = env%calc%micro_opt +!>--- set multilevels, or enforce just one + multilevel(:) = .false. + if(env%multilevelopt)then + multilevel(:) = multilevel_in(:) + else + k = optlevmap_alt(env%optlev) + multilevel(k) = .true. + endif + pr = .false. l = count(multilevel) if( l > 1 )then diff --git a/src/classes.f90 b/src/classes.f90 index b6661674..70236154 100644 --- a/src/classes.f90 +++ b/src/classes.f90 @@ -522,7 +522,7 @@ module crest_data logical :: legacy = .false. !> switch between the original system call routines of crest and newer, e.g. tblite implementations logical :: metadynset !> is the number of MTDs already set (V2) ? logical :: methautocorr !> try to automatically include Methyl equivalencies in CREGEN ? - logical :: multilevelopt !> perform the multileveloptimization + logical :: multilevelopt =.true. !> perform the multileveloptimization logical :: newcregen = .false. !> use the CREGEN rewrite logical :: NCI !> NCI special usage logical :: niceprint !> make a nice progress-bar printout diff --git a/src/confparse.f90 b/src/confparse.f90 index 3538154c..868fb447 100644 --- a/src/confparse.f90 +++ b/src/confparse.f90 @@ -1350,7 +1350,7 @@ subroutine parseflags(env,arg,nra) env%forceconst = xx(1) end if write (*,'(2x,a,f6.4,a)') '-fc ',env%forceconst,': selected force constant in Eh' - case ('-nomlo') !> turn off multilevel optimization + case ('-nomlo','-no-multilevel') !> turn off multilevel optimization env%multilevelopt = .false. case ('-normmd') !> set number of normMDs env%rotamermds = .true. diff --git a/src/parsing/parse_maindata.f90 b/src/parsing/parse_maindata.f90 index bad81ed5..aad5e614 100644 --- a/src/parsing/parse_maindata.f90 +++ b/src/parsing/parse_maindata.f90 @@ -218,6 +218,8 @@ subroutine parse_main_bool(env,key,val) if (val) then call read_restart(env) end if + case ('multilevelopt') + env%multilevelopt = val end select return end subroutine parse_main_bool diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 216793da..145e0523 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -7,6 +7,7 @@ s-dftd3.wrap test-drive.wrap mctc-lib.wrap xhcff +lammps* !lwoniom !gfn0