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

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
lewis martin
Posts: 63
Joined: Tue Mar 06, 2018 8:56 pm

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

Post by lewis martin » Thu Jun 25, 2020 9:13 pm

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

User avatar
Peter Eastman
Posts: 2544
Joined: Thu Aug 09, 2007 1:25 pm

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

Post by Peter Eastman » Thu Jul 02, 2020 11:56 am

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.

User avatar
lewis martin
Posts: 63
Joined: Tue Mar 06, 2018 8:56 pm

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

Post by lewis martin » Thu Jul 02, 2020 4:35 pm

That makes more sense - thanks!

POST REPLY