ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/types/OplsTorsionType.hpp
Revision: 3446
Committed: Wed Sep 10 19:51:45 2008 UTC (15 years, 9 months ago) by cli2
File size: 4433 byte(s)
Log Message:
Inversion fixes and amber mostly working

File Contents

# Content
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 c0 = c0/2;
91 c1 = c1/2;
92 c2 = c2/2;
93 c3 = c3/2;
94 // I change the parameter to half to see if this is the problem.
95 setCoefficient(0, c0);
96 setCoefficient(1, c1);
97 setCoefficient(2, c2);
98 setCoefficient(3, c3);
99 }
100
101 friend std::ostream& operator <<(std::ostream& os, OplsTorsionType& ott);
102
103 private:
104
105 RealType v1_;
106 RealType v2_;
107 RealType v3_;
108
109 };
110
111 std::ostream& operator <<(std::ostream& os, OplsTorsionType& ott) {
112
113 os << "This OplsTorsionType has below form:" << std::endl;
114 os << ott.v1_ << "/2*(1+cos(phi))" << " + "
115 << ott.v2_ << "/2*(1-cos(2*phi))" << " + "
116 << ott.v3_ << "/2*(1+cos(3*phi))" << std::endl;
117 return os;
118 }
119
120
121 } //end namespace oopse
122 #endif //TYPES_OPLSTORSIONTYPE_HPP
123
124

Properties

Name Value
svn:executable *