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

compatibility with enforce2d #1

Open
gideonsimpson opened this issue Dec 6, 2017 · 7 comments
Open

compatibility with enforce2d #1

gideonsimpson opened this issue Dec 6, 2017 · 7 comments

Comments

@gideonsimpson
Copy link
Collaborator

have you tested this with enforce2d? I'm finding that my atoms are moving in the z direction with the bd fix, even when I've got enforce2d

@anyuzx
Copy link
Owner

anyuzx commented Dec 7, 2017

Hi

I never used enforced2d with this fix together. I just had a look at source code of fix enforced2d. It restricts the movement in 2d by enforcing the velocity in the z-direction to be zero. However the velocity in the fix_bd is not defined, the movements of particles are directly due to the displacement rather than velocity. So you actually need a custom enforced2d to enforce the force and displacement (instead of velocity) in the z-direction to be zero. By looking at the source code of enforced2d, I imagine it should be relative straightforward. I hope this helps.

@gideonsimpson
Copy link
Collaborator Author

I guess another alternative would be to modify your code to create bd2d, which would only apply forces/thermal fluctuations in the x,y coordinates.

@gideonsimpson
Copy link
Collaborator Author

Not sure if it's worth adding to your project, but for the bd fix, I made a bd2d by deleting the z coordinates in the source, and it worked as hoped.

@anyuzx
Copy link
Owner

anyuzx commented Dec 14, 2017

@gideonsimpson Thx! If you want, I can add you as a collaborator and you can try to make a commit to the repository.

@gideonsimpson
Copy link
Collaborator Author

sure, add me

@aortiza
Copy link
Contributor

aortiza commented Aug 21, 2019

I took your suggestion of the customized enforce2d. I am making a pull request if you want to incorporate it.

@anyuzx
Copy link
Owner

anyuzx commented Aug 21, 2019

I took your suggestion of the customized enforce2d. I am making a pull request if you want to incorporate it.

Thank you for the 2D code! I will make the merge

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

No branches or pull requests

3 participants