http://qs321.pair.com?node_id=353283


in reply to Re: Processing data with lot of math...
in thread Processing data with lot of math...

Yes, but can this be simplified?

For example, I can store all the boxes that exist in an array as: $box(i)="L:M:N". Now I can store cooridinates as:

$x[l][m][n][i]=Xvalue of i'th atom in the box $y[l][m][n][i]=Yvalue of i'th atom in the box $z[l][m][n][i]=Zvalue of i'th atom in the box
Then all I would need to do is to loop over all boxes (using @box) and checking existence of it's neighbouring boxes (I would need a hash here, I guess... Emmm..., box should be a hash and I can use its values in the above), and for all those exists I can loop over their atoms.

Does this make sense or sound better?

Replies are listed 'Best First'.
Re: Re: Re: Processing data with lot of math...
by BrowserUk (Patriarch) on May 14, 2004 at 18:20 UTC

    Okay. From this post I think that my original post did not explain the method I was trying to outline very well. Also, looking back at itubs reply, he also seems not to have fully understood what I was getting at.

    I've put together a crude simulation using some randomly generated data, and it seems that using my method will process: 10,000 atoms, in around 17 seconds using < 6 MB memory. 20,000 atoms, in around 112 seconds using < 11 MB 30,000 atoms, in around 350 seconds using < 14 MB.

    From these crude tests, I think it would handle 100,000 atoms in around 2 1/2 hours using 40 MB ram.

    Update Ignore the figures above. I discovered a stupidity in my testcase that meant I was doing way more work than I needed to. I can now processing 100,000 atoms using 50MB in under 4 minutes.

    This is without any attempt to really optimise things. I have no real feel for how this compares with other methods as I don't know what other methods are used.

    I don't know for sure that I am processing the data correctly.

    If you have a smallish (1000 or 2000 atom) dataset (with the desired results for a specified cutoff), that you could make available to me somehow?

    Posting this here is probably not a good idea:), but I could let you have my email id.

    Then I could see if what I am doing even approximates to giving correct results before I go posting triumphantly.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail