SimonEnsemble / PorousMaterials.jl

Julia package towards classical molecular modeling of nanoporous materials
GNU General Public License v3.0
51 stars 11 forks source link

Take snapshots of molecule positions during GCMC and record adsorbate density grid #107

Closed SimonEnsemble closed 5 years ago

SimonEnsemble commented 5 years ago

@ahyork

Looks great! Before merging this PR:

SimonEnsemble commented 5 years ago

one more thing: the GCMC prints off a bunch of stuff in the beginning.

if snapshots are being taken, can you printf "writing snapshots of adsorption positions every %d cycles (after burn cycles)\n"

if density grid is being written, can you printf "adsorption spatial probability density grid written with spacing %.3f Angstrom every %d cycles (after burn cycles)"

ahyork commented 5 years ago

I went through all suggestions and implemented them. The branch passes all tests as well.

This should be ready to merge, I am going to update the docs site so the new function appear there as well.

SimonEnsemble commented 5 years ago
SimonEnsemble commented 5 years ago

@printf("\tAdsorption spatial probability density grid written with spacing %.3f Angstroms every %d cycles (after burn cycles)\n", density_grid_dx, snapshot_frequency) also can you print out density_grid.n_pts to alert the user if the grid is so fine that it is going to be a huge file?

ahyork commented 5 years ago

I am wrapping up with these edits soon, but I was just thinking about changing the *_frequency to *_period. This is going to break a lot of backwards compatibility because these are optional arguments. People will need to change their scripts in order to keep this working.

I think it is a good idea to do this, but we should release the next version as 1.0.0 since PorousMaterials.jl is no longer going through rapid development and the API won't be compatible with scripts written for older versions.

ahyork commented 5 years ago

I found an issue when writing a test for the O_CO2 in CO2. One of the atoms is outside the box, and so it cannot be placed at a negative index. I am going to see if I can use NearestImage to get the indices to wrap.

SimonEnsemble commented 5 years ago

:fireworks: hooray for tests! Didn't think of that...

ahyork commented 5 years ago

I think we should leave renaming *_frequency to *_period for a later time.

I agree that informative parameter names are important, but that small change breaks some backwards compatibility.

We should leave it out for now, but we should go through and decide what 'stable' PorousMaterials.jl looks like. Then we can fix small errors like this without creating a chain of incompatible releases

SimonEnsemble commented 5 years ago

sure, that is fine with me!

ahyork commented 5 years ago

This should be good to go now! Take a look at the new xf_to_id. It checks to see if it is above and below because it has to treat them with different cases.

SimonEnsemble commented 5 years ago

thanks @ahyork

do these changes look ok to you?

ahyork commented 5 years ago

Those changes look good to me, I am going to add these new functions to the docs and then merge unless there is anything else you think we should add?