smog-server / OpenSMOG

OpenSMOG is a Python library for performing molecular dynamics simulations using Structure-Based Models. OpenSMOG uses OpenMM.
MIT License
11 stars 6 forks source link

possible mix-up of energy terms #52

Closed Whitford closed 2 years ago

Whitford commented 2 years ago

I think this may not be robust. Are we certain that every possible all-atom model will read the forces in the same order? What determines the order of forces? If we place bonds after angles in the top. Does it change the order internally?

self.Top = GromacsTopFile(Topfile,unitCellDimensions=self.Gro.getUnitCellDimensions()) self.system = self.Top.createSystem(nonbondedMethod=CutoffPeriodic,nonbondedCutoff=self.rcutoff) nforces = len(self.system.getForces()) for force_id, force in enumerate(self.system.getForces()): if nforces == 7: if force_id <=4: force.setForceGroup(force_id) self.forcesDict[self.forceNamesCA[force_id]] = force self.forceCount +=1 else: force.setForceGroup(30) elif nforces == 8: if force_id <=5: force.setForceGroup(force_id) self.forcesDict[self.forceNamesAA[force_id]] = force self.forceCount +=1 else: force.setForceGroup(30)

Whitford commented 2 years ago

another issue is the order of energies here:

Whitford commented 2 years ago

Esteban is the man.