Warren DeLano wrote:
> To find the two atoms most distant from one another, you could iterate over all pairs of coordinates. This is possible in PyMOL as shown below, but is impractically slow for large structures due to the N^2 dependence.
>
> # PyMOL Script: longest_diagonal.pml
>
> # takes 5-10 seconds with a 1,600 atom structure
>
Doing it in fortran shaves that to 93 ms for 1600 atoms,
but n^2 catches up rapidly: 32657 atoms takes 29 s.
http://sb20.lbl.gov/berry/for/pdbdistmax.for
(compiles w gfortran, not tested extensively, author takes no responsibility, etc)
Ed
|