Use custom forces in somd-freenrg

32 views
Skip to first unread message

John Young

unread,
Jul 8, 2021, 8:46:49 AM7/8/21
to Sire Users
Dear sire community: 

     I'm new to molecular simulation and found sire is a great tool to conduct free energy calculation.  I've read sire's documentation and found its gpu accelaration was provided by OpenMM (please correct me if that's not the case). 

      One good feature of OpennMM is custom foreces. One could write custom forces with lines of python code.  I would like to use some custom forces in free energy calculations. Any idea how to do that with sire? 

Thanks!

Christopher

unread,
Jul 8, 2021, 8:54:28 AM7/8/21
to Sire Users

  Hi,

Thanks for getting in touch and for the kind words about Sire. Yes, you are right that Sire uses OpenMM for GPU acceleration of the molecular dynamics free energy calculations (e.g. via somd, somd-freenrg etc). 

I agree that custom forces are a great feature in OpenMM, and it would be nice to be able to access them from within Sire. Unfortunately, as things stand, that isn't really possible. Currently the OpenMM molecular system is built from the Sire system assuming that the Sire system is parameterised via a standard Amber-type forcefield. This happens in the C++ part of the code (in the OpenMM- functions in the SireMove source code folder, e.g. openmmfrenergydt.cpp - https://github.com/michellab/Sire/blob/devel/corelib/src/libs/SireMove/openmmfrenergydt.cpp). 

You could edit the source code directly to add in the custom forces you wanted, but I know that isn't ideal. There isn't a mechanism to load those custom forces from Python into the parameterised molecule and to then transfer them into OpenMM without hand-coding. If you want to hand-code this, then we are happy to point you in the right direction if that helps?

  Best wishes,

  Christopher

p.s. Sire forms the foundation of BioSimSpace (https://biosimspace.org), which provides interfaces and drivers to run free energy calculations in a range of packages

John Young

unread,
Jul 9, 2021, 2:44:49 AM7/9/21
to Sire Users
Hi Christopher, 

      Thanks for the reply! I understand the situation better now.  I'm not quite familiar with C++, maybe I need to finish your lesson first https://chryswoods.com/beginning_c++/index.html, hopefully it won't take me too long. 

Reply all
Reply to author
Forward
0 new messages