Implemented CHARMM polarizable force field

You wouldn't believe what a long and painful process this has been!
+11000 lines... dear god.


On Mon, Jul 14, 2014 at 5:02 PM, John Chodera <notifications@github.com>
wrote:

> In wrappers/python/simtk/openmm/app/forcefield.py:
>
> > @@ -950,18 +964,22 @@ def createForce(self, sys, data, nonbondedMethod, nonbondedCutoff, args):
> >                  if type1 in types1:
> >                      for (t2, t3, t4) in itertools.permutations(((type2, 1), (type3, 2), (type4, 3))):
> >                          if t2[0] in types2 and t3[0] in types3 and t4[0] in types4:
> > -                            # Workaround to be more consistent with AMBER.  It uses wildcards to define most of its
> > -                            # impropers, which leaves the ordering ambigous.  It then follows some bizarre rules
> > -                            # to pick the order.
> > -                            a1 = torsion[t2[1]]
> > -                            a2 = torsion[t3[1]]
> > -                            e1 = data.atoms[a1].element
> > -                            e2 = data.atoms[a2].element
> > -                            if e1 == e2 and a1 > a2:
> > -                                (a1, a2) = (a2, a1)
> > -                            elif e1 != elem.carbon and (e2 == elem.carbon or e1.mass < e2.mass):
> > -                                (a1, a2) = (a2, a1)
> > -                            force.addTorsion(a1, a2, torsion[0], torsion[t4[1]], tordef.c[0], tordef.c[1], tordef.c[2], tordef.c[3], tordef.c[4], tordef.c[5])
> > +                            if wildcard in (types1, types2, types3, types4):
> > +                                # Workaround to be more consistent with AMBER.  It uses wildcards to define most of its
>
> I think I was confused by this section:
>
> # Workaround to be more consistent with AMBER.
>
> I guess I missed the addition of this section in the first place....
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/SimTk/openmm/pull/531/files#r14911460>.
>



-- 
Yutong Zhao
Stanford University

www.proteneer.com | simbios.stanford.edu