Short range non-bonded interactions =================================== **Overview** The net non-bonded force of each particle is produced by summing all the non-bonded forces of neighboring particles on the basis of a neighbor list that lists the interacting particles for each particle, built beforehand. Because of the independence of parallel CUDA threads, a pair of interacting particles is inevitably included independently in neighbor list in the mode that one thread calculates and sums all non-bonded forces of a particle. The common non-bonded potential energy functions are included. ========================== ================================ :ref:`lennard-jones` :py:class:`LjForce` :ref:`shift-lennard-jones` :py:class:`SljForce` :ref:`linear-pi-pi` :py:class:`CenterForce` :ref:`gem` :py:class:`GEMForce` :ref:`ljewald` :py:class:`LJEwaldForce` :ref:`ljcoulombshift` :py:class:`LJCoulombShiftForce` :ref:`lj9_6-repulsion` :py:class:`PairForce` :ref:`harmonic-repulsion` :py:class:`PairForce` :ref:`gaussian-repulsion` :py:class:`PairForce` :ref:`IPL-potential` :py:class:`PairForce` :ref:`Coulomb-potential` :py:class:`PairForce` ========================== ================================ .. _lennard-jones: Lennard-Jones (LJ) interaction ------------------------------ Description: .. math:: :nowrap: \begin{eqnarray*} V_{\mathrm{LJ}}(r) = & 4 \epsilon \left[ \left( \frac{\sigma}{r} \right)^{12} - \alpha \left( \frac{\sigma}{r} \right)^{6} \right] & r < r_{\mathrm{cut}} \\ = & 0 & r \ge r_{\mathrm{cut}} \\ \end{eqnarray*} The following coefficients must be set per unique pair of particle types: - :math:`\epsilon` - *epsilon* (in energy units) - :math:`\sigma` - *sigma* (in distance units) - :math:`\alpha` - *alpha* (unitless) - :math:`r_{\mathrm{cut}}` - *r_cut* (in distance units) - *optional*: defaults to the global r_cut specified in the pair command .. py:class:: LJForce(all_info, nlist, r_cut) The constructor of LJ interaction calculation object. :param AllInfo all_info: The system information. :param NeighborList nlist: The neighbor list. :param float r_cut: The cut-off radius. .. py:function:: setParams(string type1, string type2, float epsilon, float sigma, float alpha) specifies the LJ interaction parameters with type1, type2, epsilon, sigma, and alpha. .. py:function:: setParams(string type1, string type2, float epsilon, float sigma, float alpha, float r_cut) specifies the LJ interaction parameters with type1, type2, epsilon, sigma, alpha, and cut-off of radius. .. py:function:: setEnergy_shift() calls the function to shift LJ potential to be zero at cut-off point. .. py:function:: setDispVirialCorr(bool open) switches the dispersion virial correction. Example:: lj = gala.LJForce(all_info, neighbor_list, 3.0) lj.setParams('A', 'A', 1.0, 1.0, 1.0) lj.setEnergy_shift() app.add(lj) # Note: adds this object to the application. .. _shift-lennard-jones: Shift Lennard-Jones (LJ) interaction ------------------------------------ Description: .. math:: :nowrap: \begin{eqnarray*} V_{\mathrm{SLJ}}(r)=&4 \epsilon \left[ \left( \frac{\sigma }{r-\Delta } \right)^{12}-\alpha \left( \frac{\sigma }{r-\Delta } \right)^{6} \right] & r<(r_{\mathrm{cut}}+\Delta ) \\ = & 0 & r \ge (r_{\mathrm{cut}}+\Delta ) \\ \end{eqnarray*} The following coefficients must be set per unique pair of particle types: - :math:`\epsilon` - *epsilon* (in energy units) - :math:`\sigma` - *sigma* (in distance units) - :math:`\alpha` - *alpha* (unitless) - *optional*: defaults to 1.0 - :math:`\Delta = (d_{i} + d_{j})/2 - \sigma` - (in distance units); :math:`d_{i}` and :math:`d_{j}` are the diameter of particle :math:`i` and :math:`j` which can be input from XML file. - :math:`r_{\mathrm{cut}}` - *r_cut* (in distance units) - *optional*: defaults to the global r_cut specified in the pair command .. py:class:: SLJForce(all_info, nlist, r_cut) The constructor of shift LJ interaction calculation object. :param AllInfo all_info: The system information. :param NeighborList nlist: The neighbor list. :param float r_cut: The cut-off radius. .. py:function:: setParams(string type1, string type2, float epsilon, float sigma, float alpha) specifies the shift LJ interaction parameters with type1, type2, epsilon, sigma, and alpha. .. py:function:: setParams(string type1, string type2, float epsilon, float sigma, float alpha, float r_cut) specifies the shift LJ interaction parameters with type1, type 2, epsilon, sigma, alpha, and cut-off of radius. .. py:function:: setEnergy_shift() calls the function to shift LJ potential to be zero at the cut-off point. Example:: slj = gala.SLJForce(all_info, neighbor_list, 3.0) slj.setParams('A', 'A', 1.0, 1.0, 1.0) slj.setEnergy_shift() app.add(slj) .. _linear-pi-pi: Linear molecule :math:`\pi`-:math:`\pi` interaction --------------------------------------------------- An attractive potential to mimic :math:`\pi-\pi` interactions of rod segments. Reference: Y.-L. Lin, H.-Y. Chang, and Y.-J. Sheng, Macromolecules 2012, 45, 7143-7156. Description: .. math:: :nowrap: \begin{eqnarray*} V_{\mathrm{\pi-\pi}}(r, \theta)=&-\epsilon \cos^{2}\theta (1-r) & r