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

Radius of Gyration needs wrap option #1760

Open
kain88-de opened this issue Jan 24, 2018 · 8 comments
Open

Radius of Gyration needs wrap option #1760

kain88-de opened this issue Jan 24, 2018 · 8 comments

Comments

@kain88-de
Copy link
Member

kain88-de commented Jan 24, 2018

Expected behaviour

Calculating correct radius of gyration when protein is split on the periodic boundary and we set pbc=True

Actual behaviour

Neither with the pbc option set or without it do I get the correct radius of gyration. This is because to correctly handle the split of a protein on periodic boundaries we would need to recombine proteins that are split (unwrap them)

Example protein for which the correct value should be 2-4 nm.

Code to reproduce the behaviour

import MDAnalysis as mda

u = mda.Universe('protein.gro')
u.atoms.radius_of_gyration(pbc=True)

Currently version of MDAnalysis:

(run python -c "import MDAnalysis as mda; print(mda.__version__)")

@richardjgowers
Copy link
Member

The pbc keyword will apply PBC by forcing everything into the primary unit cell.

I think what you want is unwrap, to make the molecule whole and continuous, which is issue #1185 right?

@kain88-de
Copy link
Member Author

yeah sorry, unwrap. Just forcing everything into the primary unit cell is definitely the wrong thing to do for the radius of gyration calculation.

@orbeckst
Copy link
Member

Should we change what pbc=True does for radius_of_gyration()? Do we have enough information to always correctly unwrap the selection?

@orbeckst
Copy link
Member

P.S.: I created the new label:PBC – we have so many issues relating to periodic boundary conditions – a GSOC student digging into this would be great.

@richardjgowers
Copy link
Member

richardjgowers commented Jan 25, 2018 via email

@orbeckst
Copy link
Member

orbeckst commented Jan 25, 2018 via email

@richardjgowers
Copy link
Member

I'm going to close this because it's a duplicate of #1185

@kain88-de
Copy link
Member Author

I would like to keep this open as the pbc keyword doesn't produce a correct result right now as one would expect. The bug should be open until it's removed.

@kain88-de kain88-de reopened this Jan 25, 2018
@richardjgowers richardjgowers changed the title Radius of Gyration doesn't work with periodic boundaries. Radius of Gyration needs wrap option May 7, 2018
jbarnoud pushed a commit that referenced this issue Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants