Skip to content

Commit 74e80fa

Browse files
committed
Merge remote-tracking branch 'origin/master' into pylibefp2
2 parents 8ad4ca4 + 1cd8caa commit 74e80fa

21 files changed

Lines changed: 3059 additions & 1031 deletions

File tree

.DS_Store

-10 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,13 @@ jobs:
143143
activate-environment: libefp-dev
144144
environment-file: export.yaml
145145
python-version: ${{ matrix.cfg.python-version }}
146-
miniforge-variant: Mambaforge
147-
use-mamba: true
148-
channels: conda-forge,nodefaults
146+
channels: conda-forge
147+
conda-remove-defaults: true
149148

150149
- name: Environment Information
151150
run: |
152-
mamba info
153-
mamba list
151+
conda info
152+
conda list
154153
155154
- name: Configure CMake
156155
run: |
@@ -225,7 +224,7 @@ jobs:
225224
# Step is unnecessary; remove for debugging.
226225
- name: Confound Environment - test fetched pybind11
227226
if: ${{ matrix.cfg.blas == 'OBL' }}
228-
run: mamba remove pybind11
227+
run: conda remove pybind11
229228

230229
- name: Build & Install Python bindings
231230
run: |

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ build*/
2828
/cmake-build-debug/
2929
comp*.log
3030
/lib
31-
31+
.DS_Store

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ project(
3434

3535
set(CMAKE_INSTALL_PREFIX "$ENV{LIBEFP_DIR}" CACHE PATH "Installation directory" FORCE)
3636
#set(CMAKE_INSTALL_PREFIX "${LIBEFP_DIR}" CACHE PATH "Installation directory")
37+
#set(CMAKE_INSTALL_LIBDIR "lib")
3738

3839
### LVS needs this on MacOS silicon
3940
set(CMAKE_CXX_STANDARD 17)
@@ -231,6 +232,9 @@ install(FILES fraglib/makefp.inp
231232
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/fraglib
232233
DESTINATION ${CMAKE_INSTALL_DATADIR}/${efp})
233234

235+
#install(DIRECTORY ${PROJECT_SOURCE_DIR}/nnlib
236+
# DESTINATION ${CMAKE_INSTALL_DATADIR}/${efp})
237+
234238
# headers NOT namespace protected
235239
install(FILES ${src_prefix}/efp.h
236240
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

efpmd/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ if(torch_switch)
8484
message("TORCH_INCLUDE_DIRS = ${TORCH_INCLUDE_DIRS}")
8585
endif()
8686

87+
#CXX_STANDARD 14
88+
8789
set_target_properties(efpmd PROPERTIES
88-
CXX_STANDARD 14
90+
CXX_STANDARD 17
8991
CXX_STANDARD_REQUIRED YES
9092
)
9193

efpmd/src/main.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ static struct cfg *make_cfg(void)
147147
cfg_add_bool(cfg, "hess_central", false);
148148
cfg_add_double(cfg, "num_step_dist", 0.001);
149149
cfg_add_double(cfg, "num_step_angle", 0.01);
150+
cfg_add_double(cfg, "pol_damp_value", 0.6);
150151

151152
cfg_add_enum(cfg, "ensemble", ENSEMBLE_TYPE_NVE,
152153
"nve\n"
@@ -351,6 +352,7 @@ static struct efp *create_efp(const struct cfg *cfg, const struct sys *sys)
351352
.elec_damp = cfg_get_enum(cfg, "elec_damp"),
352353
.disp_damp = cfg_get_enum(cfg, "disp_damp"),
353354
.pol_damp = cfg_get_enum(cfg, "pol_damp"),
355+
.pol_damp_tt_value = cfg_get_double(cfg, "pol_damp_value"),
354356
.pol_driver = cfg_get_enum(cfg, "pol_driver"),
355357
.enable_pbc = cfg_get_bool(cfg, "enable_pbc"),
356358
.enable_elpot = cfg_get_bool(cfg, "enable_elpot"),
@@ -367,7 +369,7 @@ static struct efp *create_efp(const struct cfg *cfg, const struct sys *sys)
367369
.print = cfg_get_int(cfg, "print")
368370
};
369371

370-
// adjustoing special terms
372+
// adjusting special terms
371373
if (opts.special_terms == 0) opts.special_terms = opts.terms;
372374

373375
enum efp_coord_type coord_type = cfg_get_enum(cfg, "coord");
@@ -376,14 +378,6 @@ static struct efp *create_efp(const struct cfg *cfg, const struct sys *sys)
376378
if (!efp)
377379
error("unable to create efp object");
378380

379-
if (cfg_get_bool(cfg, "single_params_file"))
380-
check_fail(efp_add_potential(efp, cfg_get_string(cfg, "efp_params_file")));
381-
else
382-
add_potentials(efp, cfg, sys);
383-
384-
for (size_t i = 0; i < sys->n_frags; i++)
385-
check_fail(efp_add_fragment(efp, sys->frags[i].name));
386-
387381
if (sys->n_charges > 0) {
388382
double q[sys->n_charges];
389383
double pos[3 * sys->n_charges];
@@ -407,10 +401,19 @@ static struct efp *create_efp(const struct cfg *cfg, const struct sys *sys)
407401
if (cfg_get_bool(cfg, "enable_ff"))
408402
opts.terms &= ~(EFP_TERM_ELEC | EFP_TERM_POL | EFP_TERM_DISP | EFP_TERM_XR);
409403

404+
check_fail(efp_set_opts(efp, &opts));
405+
406+
if (cfg_get_bool(cfg, "single_params_file"))
407+
check_fail(efp_add_potential(efp, cfg_get_string(cfg, "efp_params_file")));
408+
else
409+
add_potentials(efp, cfg, sys);
410+
411+
for (size_t i = 0; i < sys->n_frags; i++)
412+
check_fail(efp_add_fragment(efp, sys->frags[i].name));
413+
410414
if (opts.enable_pairwise)
411415
check_fail(efp_add_ligand(efp, opts.ligand));
412416

413-
check_fail(efp_set_opts(efp, &opts));
414417
check_fail(efp_prepare(efp));
415418
check_fail(efp_set_symmlist(efp));
416419

efpmd/torch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ target_include_directories(ctorch PRIVATE ${TORCH_INCLUDE_DIRS})
1717
target_link_libraries(ctorch PUBLIC "${TORCH_LIBRARIES}")
1818

1919
set_target_properties(ctorch PROPERTIES
20-
CXX_STANDARD 14
20+
CXX_STANDARD 17
2121
CXX_STANDARD_REQUIRED YES
2222
)
2323

0 commit comments

Comments
 (0)