Skip to content

Commit ade10aa

Browse files
committed
Use nm in xtc file
1 parent b28c441 commit ade10aa

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/icoscan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn do_icoscan(
143143
.pos
144144
.iter()
145145
.chain(oriented_b.pos.iter())
146-
.map(|&p| [p.x as f32, p.y as f32, p.z as f32])
146+
.map(|&p| [p.x as f32 * 0.1, p.y as f32 * 0.1, p.z as f32 * 0.1]) // angstrom to nm
147147
.collect();
148148
traj.write(&frame).expect("Failed to write XTC frame");
149149
writeln!(energy_file, "{data:.6}").expect("Failed to write energy to file");

src/icosphere.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ mod tests {
232232
Vec3A::new(0.0, 0.0, 1.0),
233233
];
234234
let area = spherical_face_area(&a, &b, &c);
235-
assert_relative_eq!(area, 0.5 * PI, epsilon = 1e-6);
235+
assert_relative_eq!(area, UNIT_SPHERE_AREA / 8.0, epsilon = 1e-6);
236236
}
237237
#[test]
238238
fn test_icosahedron_face_areas() {

src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ fn do_scan(cmd: &Commands) -> Result<()> {
207207
ref_b.total_mass(),
208208
);
209209

210-
info!(
211-
"COM range: [{rmin:.1}, {rmax:.1}) in {dr:.1} Å steps 🐾"
212-
);
210+
info!("COM range: [{rmin:.1}, {rmax:.1}) in {dr:.1} Å steps 🐾");
213211
icoscan::do_icoscan(
214212
*rmin,
215213
*rmax,

0 commit comments

Comments
 (0)