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

ValueError for prepare bonds #175

Open
hmcezar opened this issue May 2, 2022 · 1 comment
Open

ValueError for prepare bonds #175

hmcezar opened this issue May 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@hmcezar
Copy link
Member

hmcezar commented May 2, 2022

When running the peptide example with the main branch version I'm getting (not sure if it's something related with Python 3.10 or my conda installation or not):

Traceback (most recent call last):
  File "/home/hmcezar/anaconda3/envs/hymd/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/hmcezar/anaconda3/envs/hymd/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/hmcezar/Dev/Cascella_HyMD/hymd/__main__.py", line 2, in <module>
    main()
  File "/home/hmcezar/Dev/Cascella_HyMD/hymd/main.py", line 279, in main
    bonds_prep = prepare_bonds(
  File "/home/hmcezar/Dev/Cascella_HyMD/hymd/force.py", line 541, in prepare_bonds
    bonds_2, bonds_3, bonds_4, bb_index = prepare_bonds_old(
  File "/home/hmcezar/Dev/Cascella_HyMD/hymd/force.py", line 430, in prepare_bonds_old
    and [
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
@Lun4m
Copy link
Member

Lun4m commented May 2, 2022

I guess it's because the dihedral coeffs are numpy arrays, while in an earlier version they were simple lists. So either we revert that change or we fix the condition in prepare_bonds_old.
Anyway many of these problems (like also parsing the dihedrals in input_parser.py, which is written in a very clucky way) will get fixed we the index based connectivity #137 is merged.

@hmcezar hmcezar added the bug Something isn't working label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants