File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " groan_rs"
3
3
description = " Gromacs Analysis Library for Rust"
4
- version = " 0.11.0 "
4
+ version = " 0.11.1 "
5
5
license = " MIT"
6
6
edition = " 2021"
7
7
authors = [" Ladislav Bartos" ]
Original file line number Diff line number Diff line change @@ -491,17 +491,17 @@ impl PrivateTrajWrite for TrrWriter {
491
491
let iterator =
492
492
AtomIterator :: new ( system. get_atoms ( ) , self . group . get_atoms ( ) , system. get_box ( ) ) ;
493
493
494
- for atom in iterator {
494
+ for ( i , atom) in iterator. enumerate ( ) {
495
495
if let Some ( pos) = atom. get_position ( ) {
496
- coordinates[ atom . get_index ( ) ] = [ pos. x , pos. y , pos. z ] ;
496
+ coordinates[ i ] = [ pos. x , pos. y , pos. z ] ;
497
497
}
498
498
499
499
if let Some ( vel) = atom. get_velocity ( ) {
500
- velocities[ atom . get_index ( ) ] = [ vel. x , vel. y , vel. z ] ;
500
+ velocities[ i ] = [ vel. x , vel. y , vel. z ] ;
501
501
}
502
502
503
503
if let Some ( force) = atom. get_force ( ) {
504
- forces[ atom . get_index ( ) ] = [ force. x , force. y , force. z ]
504
+ forces[ i ] = [ force. x , force. y , force. z ]
505
505
}
506
506
}
507
507
Original file line number Diff line number Diff line change @@ -304,9 +304,9 @@ mod xtc_write {
304
304
let iterator =
305
305
AtomIterator :: new ( system. get_atoms ( ) , self . group . get_atoms ( ) , system. get_box ( ) ) ;
306
306
let mut coordinates = vec ! [ [ 0.0 , 0.0 , 0.0 ] ; n_atoms] ;
307
- for atom in iterator {
307
+ for ( i , atom) in iterator. enumerate ( ) {
308
308
if let Some ( pos) = atom. get_position ( ) {
309
- coordinates[ atom . get_index ( ) ] = [ pos. x , pos. y , pos. z ] ;
309
+ coordinates[ i ] = [ pos. x , pos. y , pos. z ] ;
310
310
}
311
311
}
312
312
You can’t perform that action at this time.
0 commit comments