1 |
/* |
2 |
* Copyright (c) 2005 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. Acknowledgement of the program authors must be made in any |
10 |
* publication of scientific results based in part on use of the |
11 |
* program. An acceptable form of acknowledgement is citation of |
12 |
* the article in which the program was described (Matthew |
13 |
* A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher |
14 |
* J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented |
15 |
* Parallel Simulation Engine for Molecular Dynamics," |
16 |
* J. Comput. Chem. 26, pp. 252-271 (2005)) |
17 |
* |
18 |
* 2. Redistributions of source code must retain the above copyright |
19 |
* notice, this list of conditions and the following disclaimer. |
20 |
* |
21 |
* 3. Redistributions in binary form must reproduce the above copyright |
22 |
* notice, this list of conditions and the following disclaimer in the |
23 |
* documentation and/or other materials provided with the |
24 |
* distribution. |
25 |
* |
26 |
* This software is provided "AS IS," without a warranty of any |
27 |
* kind. All express or implied conditions, representations and |
28 |
* warranties, including any implied warranty of merchantability, |
29 |
* fitness for a particular purpose or non-infringement, are hereby |
30 |
* excluded. The University of Notre Dame and its licensors shall not |
31 |
* be liable for any damages suffered by licensee as a result of |
32 |
* using, modifying or distributing the software or its |
33 |
* derivatives. In no event will the University of Notre Dame or its |
34 |
* licensors be liable for any lost revenue, profit or data, or for |
35 |
* direct, indirect, special, consequential, incidental or punitive |
36 |
* damages, however caused and regardless of the theory of liability, |
37 |
* arising out of the use of or inability to use software, even if the |
38 |
* University of Notre Dame has been advised of the possibility of |
39 |
* such damages. |
40 |
*/ |
41 |
|
42 |
/** |
43 |
* @file OplsTorsionType.hpp |
44 |
* @author teng lin |
45 |
* @date 11/16/2004 |
46 |
* @version 1.0 |
47 |
*/ |
48 |
|
49 |
#ifndef TYPES_OPLSTORSIONTYPE_HPP |
50 |
#define TYPES_OPLSTORSIONTYPE_HPP |
51 |
|
52 |
#include "types/PolynomialTorsionType.hpp" |
53 |
|
54 |
namespace oopse { |
55 |
|
56 |
/** |
57 |
* @class OplsTorsionType OplsTorsionType.hpp "types/OplsTorsionType.hpp" |
58 |
* These torsion types are defined identically with functional form given |
59 |
* in the following paper: |
60 |
* |
61 |
* "Development and Testing of the OPLS All-Atom Force Field on |
62 |
* Conformational Energetics and Properties of Organic Liquids," by |
63 |
* William L. Jorgensen, David S. Maxwell, and Julian Tirado-Rives, |
64 |
* J. Am. Chem. Soc.; 1996; 118(45) pp 11225 - 11236; |
65 |
* DOI: 10.1021/ja9621760 |
66 |
* |
67 |
* This torsion potential has the form: |
68 |
* |
69 |
* Vtors = 0.5* (v1*(1+cos(phi)) + v2*(1-cos(2*phi)) + v3*(1+cos(3*phi))) |
70 |
* |
71 |
* Notes: |
72 |
* |
73 |
* 1) OOPSE converts internally to a Polynomial torsion type because |
74 |
* all of the phase angles are zero in the OPLS paper. |
75 |
* 2) Coefficients are assumed to be in kcal / mol, and be careful about |
76 |
* that factor of 1/2 when importing the coefficients! |
77 |
*/ |
78 |
class OplsTorsionType : public PolynomialTorsionType{ |
79 |
|
80 |
public: |
81 |
|
82 |
OplsTorsionType(RealType v1, RealType v2, RealType v3) : |
83 |
PolynomialTorsionType(), v1_(v1), v2_(v2), v3_(v3) { |
84 |
|
85 |
//convert OPLS Torsion Type to Polynomial Torsion type |
86 |
RealType c0 = v2 + 0.5 * (v1 + v3); |
87 |
RealType c1 = 0.5 * (v1 - 3.0 * v3); |
88 |
RealType c2 = -v2; |
89 |
RealType c3 = 2.0 * v3; |
90 |
|
91 |
setCoefficient(0, c0); |
92 |
setCoefficient(1, c1); |
93 |
setCoefficient(2, c2); |
94 |
setCoefficient(3, c3); |
95 |
} |
96 |
|
97 |
friend std::ostream& operator <<(std::ostream& os, OplsTorsionType& ott); |
98 |
|
99 |
private: |
100 |
|
101 |
RealType v1_; |
102 |
RealType v2_; |
103 |
RealType v3_; |
104 |
|
105 |
}; |
106 |
|
107 |
std::ostream& operator <<(std::ostream& os, OplsTorsionType& ott) { |
108 |
|
109 |
os << "This OplsTorsionType has below form:" << std::endl; |
110 |
os << ott.v1_ << "/2*(1+cos(phi))" << " + " |
111 |
<< ott.v2_ << "/2*(1-cos(2*phi))" << " + " |
112 |
<< ott.v3_ << "/2*(1+cos(3*phi))" << std::endl; |
113 |
return os; |
114 |
} |
115 |
|
116 |
|
117 |
} //end namespace oopse |
118 |
#endif //TYPES_OPLSTORSIONTYPE_HPP |
119 |
|
120 |
|