Column 1 & 2 are the actual atomic element(1 or 2 letters, right-justified) except in the case of hydrogens, where column 1 is actually the number of the hydrogen.
Column 3 is the distance specified by a greek letter
Column 4, mostly empty, is the number of the heavy atom at the distance.
eg Leucine has two 'CD's so they are CD1 and CD2. the hydrogens respectively are: 1HD1, 2HD1, 3HD1, 1HD2, 2HD2 and 3HD3.
So weight can indeed be given. The highest weight would be given to atomnames that consist of the element only, N, C and O, and also to the 'first' Carbon, CA.
Thereafter, it matters little which heavy atom, only the distance is important, so the second tier of weights will be given to the distance: B,G,D,E,Z,H
Finally, the hydrogens are last, and their weights are threefold, their number followed by their distance, followed by their heavy atom number at that distance.
I'd started to 'weigh' things within the sortAtom function mentioned below this way:
my aim was to then do this:foreach my $a (@names){ if($a->atomName eq 'N'){ $main{1}=$a; }elsif($a->atomName eq 'CA'){ $main{2}=$a; }elsif($a->atomName eq 'C'){ $main{3}=$a; }elsif($a->atomName eq 'O' || $a->atomName eq 'O\''){ $main{4}=$a; } }
Is this what you're getting at browserUk?foreach my $i (sort {$a <=> $b} keys %main){ push @values, $main{$i}; }
Thanks
Sam
In reply to Re: Re: sorting according to greek alphabet in roman letters
by seaver
in thread sorting according to greek alphabet in roman letters
by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |