File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,11 @@ impl Moments {
89
89
coc. norm( )
90
90
) ;
91
91
92
+ let mu = self . dipole_moment_scalar / self . number_of_samples as f64 ;
92
93
println ! (
93
- "dipole moment 𝛍 = ⟨|∑qᵢ𝐫ᵢ|⟩ = {:.1} eÅ" ,
94
- self . dipole_moment_scalar / self . number_of_samples as f64
94
+ "mean dipole moment 𝛍 = ⟨|∑qᵢ𝐫ᵢ|⟩ = {:.1} eÅ = {:.1} D" ,
95
+ mu,
96
+ mu / 0.2081943
95
97
) ;
96
98
}
97
99
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub struct Args {
51
51
#[ clap( short, long, default_value_t = 7.0 ) ]
52
52
pub bjerrum_length : f64 ,
53
53
54
- /// Target dipole moment (eÅ )
54
+ /// Target dipole moment (Debye )
55
55
#[ clap( short = 'u' , long = "--dipole" , required = false ) ]
56
56
pub target_dipole_moment : Option < f64 > ,
57
57
}
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ fn main() -> Result<(), Box<dyn Error>> {
50
50
let pair_potential = energy:: Coulomb :: new ( args. bjerrum_length ) ;
51
51
hamiltonian. push ( energy:: Nonbonded :: new ( pair_potential) ) ;
52
52
if args. target_dipole_moment . is_some ( ) {
53
+ // in Debye units
53
54
hamiltonian. push ( energy:: ConstrainDipole :: new (
54
55
100.0 ,
55
- args. target_dipole_moment . unwrap ( ) ,
56
+ args. target_dipole_moment . unwrap ( ) * 0.2081943 ,
56
57
) )
57
58
}
58
59
You can’t perform that action at this time.
0 commit comments