Skip to content

Commit 289ff8f

Browse files
committed
revolution almost done - working version
1 parent 232d845 commit 289ff8f

7 files changed

Lines changed: 141 additions & 277 deletions

File tree

efpmd/src/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ static struct cfg *make_cfg(void)
166166
cfg_add_int(cfg, "update_params", 0);
167167
cfg_add_double(cfg, "update_params_cutoff", 0.0);
168168

169+
cfg_add_int(cfg, "print", 0);
170+
169171
return cfg;
170172
}
171173

@@ -286,7 +288,8 @@ static struct efp *create_efp(const struct cfg *cfg, const struct sys *sys)
286288
.symmetry = cfg_get_bool(cfg, "symmetry"),
287289
.symm_frag = cfg_get_enum(cfg, "symm_frag"),
288290
.update_params = cfg_get_int(cfg, "update_params"),
289-
.update_params_cutoff = cfg_get_double(cfg, "update_params_cutoff")
291+
.update_params_cutoff = cfg_get_double(cfg, "update_params_cutoff"),
292+
.print = cfg_get_int(cfg, "print")
290293
};
291294

292295
if (opts.xr_cutoff == 0.0) {

src/efp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ check_params(struct efp *efp)
449449
enum efp_result res;
450450

451451
for (size_t i = 0; i < efp->n_frag; i++) {
452-
// print_frag_info(efp, i);
452+
if (efp->opts.print > 1)
453+
print_frag_info(efp, i);
453454
if ((res = check_frag_params(&efp->opts, efp->frags + i))) {
454455
efp_log("check_params() failure");
455456
return res;

src/efp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ struct efp_opts {
177177
int update_params;
178178
/** Cutoff when updating parameters is "safe". Default 0.0 (never safe) */
179179
double update_params_cutoff;
180+
/** Level of print out */
181+
int print;
180182
};
181183

182184
/** EFP energy terms. */

0 commit comments

Comments
 (0)