OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
UFF.hpp
1/*
2 * Copyright (c) 2020 The University of Notre Dame. All Rights Reserved.
3 *
4 * The University of Notre Dame grants you ("Licensee") a
5 * non-exclusive, royalty free, license to use, modify and
6 * redistribute this software in source and binary code form, provided
7 * that the following conditions are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * This software is provided "AS IS," without a warranty of any
18 * kind. All express or implied conditions, representations and
19 * warranties, including any implied warranty of merchantability,
20 * fitness for a particular purpose or non-infringement, are hereby
21 * excluded. The University of Notre Dame and its licensors shall not
22 * be liable for any damages suffered by licensee as a result of
23 * using, modifying or distributing the software or its
24 * derivatives. In no event will the University of Notre Dame or its
25 * licensors be liable for any lost revenue, profit or data, or for
26 * direct, indirect, special, consequential, incidental or punitive
27 * damages, however caused and regardless of the theory of liability,
28 * arising out of the use of or inability to use software, even if the
29 * University of Notre Dame has been advised of the possibility of
30 * such damages.
31 *
32 * SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your
33 * research, please cite the appropriate papers when you publish your
34 * work. Good starting points are:
35 *
36 * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).
37 * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).
38 * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).
39 * [4] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
40 * [5] Kuang & Gezelter, Mol. Phys., 110, 691-701 (2012).
41 * [6] Lamichhane, Gezelter & Newman, J. Chem. Phys. 141, 134109 (2014).
42 * [7] Lamichhane, Newman & Gezelter, J. Chem. Phys. 141, 134110 (2014).
43 * [8] Bhattarai, Newman & Gezelter, Phys. Rev. B 99, 094106 (2019).
44 */
45
46// This implementation was created based on open code and reference websites:
47// http://towhee.sourceforge.net/forcefields/uff.html
48// http://rdkit.org/
49// http://openbabel.org
50// http://franklin.chm.colostate.edu/mmac/uff.html
51// (for the last, use the Wayback Machine: http://www.archive.org/
52
53// As well, the main UFF paper:
54// Rappe, A. K., et. al.; J. Am. Chem. Soc. (1992) 114(25) p. 10024-10035.
55
56#ifndef FORCEFIELDS_UFF_HPP
57#define FORCEFIELDS_UFF_HPP
58
59#include "types/AtomType.hpp"
60
61namespace OpenMD {
62 namespace UFF {
63 namespace Params {
64 const RealType lambda = 0.1332; //!< scaling factor for rBO correction
65 const RealType G = 332.06; //!< bond force constant prefactor
66 const RealType amideBondOrder =
67 1.41; //!< special case bond order for amide C-N bonds.
68 }; // namespace Params
69
70
71 //! calculates and returns the UFF rest length for a bond
72 /*!
73 \param bondOrder the order of the bond (as a RealType)
74 \param at1 pointer to the AtomType for atom 1
75 \param at2 pointer to the AtomType for atom 2
76 \return the rest length
77 */
78 RealType calcBondRestLength(RealType bondOrder,
79 const AtomType *at1,
80 const AtomType *at2);
81
82 //! calculates and returns the UFF force constant for a bond
83 /*!
84 \param restLength the rest length of the bond
85 \param at1 pointer to the AtomType for atom 1
86 \param at2 pointer to the AtomType for atom 2
87 \return the force constant
88 */
89 RealType calcBondForceConstant(RealType restLength,
90 const AtomType *at1,
91 const AtomType *at2);
92
93 //! Calculate the force constant for an angle bend
94 /*!
95 The angle is between atom1 - atom2 - atom3
96 \param theta0 the preferred value of the angle (in radians)
97 \param bondOrder12 order of the bond between atoms 1 and 2 (as a RealType)
98 \param bondOrder23 order of the bond between atoms 2 and 3 (as a RealType)
99 \param at1 pointer to the AtomType for atom 1
100 \param at2 pointer to the AtomType for atom 2
101 \param at3 pointer to the AtomType for atom 3
102 */
103 RealType calcAngleForceConstant(RealType theta0, RealType bondOrder12,
104 RealType bondOrder23,
105 const AtomType *at1,
106 const AtomType *at2,
107 const AtomType *at3);
108
109 //! calculate default values of the torsion parameters.
110 /*!
111 see the constructor for an explanation of the arguments
112 */
113 void calcTorsionParams(RealType bondOrder23, int atNum2, int atNum3,
114 RDKit::Atom::HybridizationType hyb2,
115 RDKit::Atom::HybridizationType hyb3,
116 const AtomType *at2,
117 const AtomType *at3, bool endAtomIsSP2);
118
119
120 bool isInGroup6(int num);
121
122 RealType equation17(RealType bondOrder23,
123 const AtomType *at2, const AtomType *at3);
124
125 //! calculates and returns the cosine of the Y angle in an improper torsion
126 //! (see UFF paper, equation 19)
127 RealType calculateCosY(const Vector3d &iPoint,
128 const Vector3d &jPoint,
129 const Vector3d &kPoint,
130 const Vector3d &lPoint);
131
132 //! calculates and returns the UFF force constant for an improper torsion
133 /*!
134 \param at2AtomicNum atomic number for atom 2
135 \param isCBoundToO boolean flag; true if atom 2 is sp2 carbon bound to sp2
136 oxygen
137 \return the force constant
138 */
139 void calcInversionCoefficientsAndForceConstant(int at2AtomicNum,
140 bool isCBoundToO);
141
142 //! calculates and returns the UFF minimum position for a vdW contact
143 /*!
144 \param at1 pointer to the AtomType for atom 1
145 \param at2 pointer to the AtomType for atom 2
146 \return the position of the minimum
147 */
148 RealType calcNonbondedMinimum(const AtomType *at1,
149 const AtomType *at2);
150
151 //! calculates and returns the UFF well depth for a vdW contact
152 /*!
153 \param at1 pointer to the AtomType for atom 1
154 \param at2 pointer to the AtomType for atom 2
155 \return the depth of the well
156 */
157 RealType calcNonbondedDepth(const AtomType *at1,
158 const AtomType *at2);
159 }
160}
161#endif
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.