Page 1 of 1

Can I trick Modeller.addMembrane into creating a membrane without requiring a list of positions?

Posted: Thu Jun 25, 2020 9:13 pm
by lewiso1
I'd like to create a pure membrane and water system. My first approach went like this:

Code: Select all

modeller = app.Modeller(Topology(), Quantity([], nanometer))
modeller.addMembrane(omm_forcefield, 'POPC')
but this raises an error at this line of Modeller:

Code: Select all

1296         proteinMinPos = Vec3(*[min((p[i] for p in proteinPos)) for i in range(3)])
because there can be no 'min' of an empty sequence. Is there a way around that? As a hack I used an alanine dipeptide as a starting point and then just deleted it later but Im sure there's a better way.

Cheers!
Lewis

Re: Can I trick Modeller.addMembrane into creating a membrane without requiring a list of positions?

Posted: Thu Jul 02, 2020 11:56 am
by peastman
I think that's just a bug. It ought to be able to handle starting from an empty topology just as addSolvent() does. In the mean time I think your approach is fine though you could start with something even smaller, like a single water molecule.

Re: Can I trick Modeller.addMembrane into creating a membrane without requiring a list of positions?

Posted: Thu Jul 02, 2020 4:35 pm
by lewiso1
That makes more sense - thanks!