Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periodic_in_z not working #49

Closed
sankasuraj opened this issue Oct 5, 2017 · 3 comments · Fixed by #55
Closed

periodic_in_z not working #49

sankasuraj opened this issue Oct 5, 2017 · 3 comments · Fixed by #55

Comments

@sankasuraj
Copy link
Contributor

Using periodic_in_z = True is giving segmentation fault in 3d while using periodic in x and y in 3d works just fine. Attaching zip file which contains the required tests.
test_periodic_3dnnps.py.zip

@sankasuraj
Copy link
Contributor Author

test_periodic_3dnnps.py.zip
Attaching a better test case

@meyer-nils
Copy link

Lines 490 and 491 in nnps_base.pyx are as follows:
# reset the length of the arrays
x_low.reset(); x_high.reset(); y_high.reset(); y_low.reset()

I am pretty sure, one should add a reset for the z-component as well.
Changing it to
# reset the length of the arrays
x_low.reset(); x_high.reset(); y_low.reset(); y_high.reset()
z_low.reset(); z_high.reset()
resolved my issues with z-periodicity and successfully passes your tests. Note that you need to recompile cython files by running
python setup.py develop
again.

@prabhuramachandran
Copy link
Contributor

@sankasuraj -- thanks.
@nilsmeyerkit -- thanks, I'll fix this in master tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants