Skip to content

bufferGridPoint2PointAcceleration

Prokop edited this page Nov 15, 2016 · 5 revisions

Algorithm for acceleration of point-to-point radial short range interaction bounded by maximum interaction range R_MAX. Typical use is for molecule-molecule interaction. The idea is to project interaction bounding spheres of atoms iatom of the molecule imol to rectangular grid. Than for all interaction partners (molecules jmol) for each of its atom jatom current box is evaluated, and only interactions with iatom projected to that grid box is evaluated.

for imol in molecules :
   gridBuff.clean()
   gridBuff.setBounds(imol)
   iatoms = imol.getAtomsWorldSpace()
   gridBuff.projectMoleculeToBox( iatoms )
   for jmol < imol :
      if ( not gridBuff.overlap(jmol.bounds) ) continue
      jatoms = jmol.getAtomsWorldSpace()
      for jatom in jatoms :
          if (not gridBuff.pointIn(jatom) ) continue
          icell = gridBuff.getCell(jatom)
          for iatom in gridBuff.getAtom(icell) :
               interact(iatom,jatom)

Clone this wiki locally