From bc229cda0bc87b242086cf323bf91c4d61400b48 Mon Sep 17 00:00:00 2001 From: Wenping Guo Date: Tue, 13 Jun 2023 08:54:47 +0800 Subject: [PATCH] rebond with options --- src/cli.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 32f6d16..20a451a 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -300,11 +300,10 @@ impl Commander { // } GoshCmd::Rebond { bond_tolerance } => { self.check()?; - if let Some(r) = bond_tolerance { - std::env::set_var("GCHEMOL_REBOND_BOND_TOLERANCE", format!("{}", r)); - } + let mut options = Molecule::rebond_options(); + options.bond_tolerance = *bond_tolerance; for mol in self.molecules.iter_mut() { - mol.rebond(); + mol.rebond_with_options(&options); println!("Created {} bonds", mol.nbonds()); } }