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

Correspondance lipid name / residue name #52

Closed
patrickfuchs opened this issue Jan 8, 2021 · 2 comments · Fixed by #58
Closed

Correspondance lipid name / residue name #52

patrickfuchs opened this issue Jan 8, 2021 · 2 comments · Fixed by #58

Comments

@patrickfuchs
Copy link
Owner

By creating a notebook example, I realized we don't check the correspondance between the lipid name given with -l option and the residue name in the PDB. For example:

Constructing the system...
System has 28526 atoms
Traceback (most recent call last):
  File "/home/fuchs/software/miniconda3/envs/buildh/bin/buildH", line 33, in <module>
    sys.exit(load_entry_point('buildh', 'console_scripts', 'buildH')())
  File "/home/fuchs/papers/buildH_Amelie/buildH/buildh/cli.py", line 232, in main
    core.fast_build_all_Hs_calc_OP(universe_woH, begin, end, dic_OP, dic_lipid, dic_Cname2Hnames)
  File "/home/fuchs/papers/buildH_Amelie/buildH/buildh/core.py", line 466, in fast_build_all_Hs_calc_OP
    dic_lipids_with_indexes = make_dic_lipids_with_indexes(universe_woH,
  File "/home/fuchs/papers/buildH_Amelie/buildH/buildh/core.py", line 365, in make_dic_lipids_with_indexes
    first_lipid_residue = universe_woH.select_atoms(selection).residues[0]
  File "/home/fuchs/software/miniconda3/envs/buildh/lib/python3.8/site-packages/MDAnalysis/core/groups.py", line 540, in __getitem__
    return self.level.singular(self.ix[item], self.universe)
IndexError: index 0 is out of bounds for axis 0 with size 0

Rather unclear, isn't it 😆 ???

The error above comes from the use of Berger_POPC instead of Berger_PLA with the -l option.

Additionnally, I'm thinking maybe we should also make a check between the argument passed to -l option and that passed to -d option. Imagine, for example, -l CHARMM-UA -d order_parameter_definitions_MODEL_Berger_POPC.def (could be solved in another issue)

@HubLot
Copy link
Collaborator

HubLot commented Jan 11, 2021

One solution is to check that residue name is present before going in the rebuild + compute OP phase.

Same for the link between -l and -d options.

@patrickfuchs
Copy link
Owner Author

👍 Yes definitely!

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.

2 participants