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

About the selection of residues #101

Open
satyajitkhatua09 opened this issue Jan 6, 2025 · 2 comments
Open

About the selection of residues #101

satyajitkhatua09 opened this issue Jan 6, 2025 · 2 comments

Comments

@satyajitkhatua09
Copy link

Hi,

I have just started using the pycontact, which seems a valuable tool for different contact calculations between two segments. I am curious about the selection tabs in GUI. Do you know if I can use the residue ID despite the segid? If yes, how do I put it inside the selection tabs? I have tried with the notation as instructed in MDAnalysis. However, it fails with the error message "Probably you specified an atom selection with 0 atoms or invalid input files". I am using PSF and DCD as inputs.

Best,
Satyajit

@maxscheurer
Copy link
Owner

Hi,

probably best to try out the selection in a standalone python script first, using just plain MDAnalysis.

import MDAnalysis as mda
u = mda.Universe(path/to/topology, path/to/trajectory)

s1 = u.select_atoms("resid 1:5")
s2 = u.select_atoms("resid 10:20")

print(s1)
print(s2)

or something of the sort...

See the MDAnalysis docs also: https://docs.mdanalysis.org/stable/documentation_pages/selections.html#simple-selections

Sorry the error message is not super helpful, I'm planning to do some maintenance on PyContact in the near future...

@satyajitkhatua09
Copy link
Author

Hi Max,

As I saw from the piece of MDAnalysis script (that you gave me), my selection was incorrect. As I have numerous segments (almost 75), I should have opted for a combination of segid and resid (like segid A and resid 1:10). Now that the selection is proper, I hope PyContact will run without an issue.

Thanks for your earnest help.

Best,
Satyajit

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

2 participants