-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Get an Index Error when running AssignLeaflets with a system built with AMBER forcefield. The membrane contains POPC.
To Reproduce
A minimal working example of code to reproduce the unexpected behaviour.
import MDAnalysis as mda
from lipyphilic.lib.assign_leaflets import AssignLeaflets
from lipyphilic.lib.area_per_lipid import AreaPerLipid
u = mda.Universe("system_amber_nw.prmtop", "prod_wat_memb1-1_nw.dcd")
leaflets = AssignLeaflets(
universe=u,
lipid_sel = 'resname POP and name P O11 O12 O13 O14'
)
leaflets.run()
areas = AreaPerLipid(
universe=u,
lipid_sel='resname POP and name P O11 O12 O13 O14',
leaflets=leaflets.leaflets
)
areas.run()
Expected behaviour
Run smoothly and store results in leaflets.leaflets attribute
Actual behaviour
Get an Index Error
IndexError Traceback (most recent call last)
[<ipython-input-32-3913732d68c0>](https://localhost:8080/#) in <module>
14 lipid_sel = "name P"
15 )
---> 16 leaflets.run()
17
18 areas = AreaPerLipid(
2 frames
[/usr/local/lib/python3.8/site-packages/lipyphilic/lib/assign_leaflets.py](https://localhost:8080/#) in _assign_leaflets(self, memb_midpoint_xy)
432 upper_leaflet = self.membrane[
433 self.membrane.positions[:, 2] >
--> 434 (memb_midpoint_xy.statistic[lipid_x_bins, lipid_y_bins]) # we don't to consider midplane_cutoff here
435 ]
436 self.leaflets[
IndexError: index 2 is out of bounds for axis 1 with size 2
Additional context
- LiPyphilic 0.10.0
- Python 3.8
- Ubuntu distribution of Linux
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working