You can get as complicated as you want, but if you just need to calculate distances from atom to atom, then it don't really matter what helix they belong to, does it? So maybe
is fine. But then I don't know what other problems you hope to solve. Structure your data in terms of the problems you need to solve, ignoring superfluous information.%atoms = ( A => [ -1.115, 8.537, 7.075 ], B => [ -2.745, 5.280, 7.165 ], C => [ -0.777, 3.267, 7.329 ], D => [ 1.610, 5.225, 10.885 ], E => [ 0.296, 5.263, 10.912 ], K => [ -0.696, 13.041, 22.357 ], L => [ 1.152, 11.081, 23.082 ], M => [ 2.200, 17.590, 18.424 ], );
Update: As an example of making things more complicated, if you need to retain all of the information, maybe your data structure would look like this (hashes all the way down):
%helixes = ( helix1 => { A => { x => -1.115, y => 8.537, z => 7.075 }, B => { x => -2.745, y => 5.280, z=> 7.165 }, ... }, helix2 => { K => { x => -0.696, y => 13.041, z => 22.357 }, L => { x => 1.152, y => 11.081, z => 23.082 }, M => { x => 2.200, y => 17.590, z => 18.424 }, }, );
In reply to Re: confused with distances
by duff
in thread confused with distances
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |