ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/UseTheForce/ForceField.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/UseTheForce/ForceField.hpp (file contents):
Revision 1740 by tim, Mon Nov 15 23:00:32 2004 UTC vs.
Revision 1783 by tim, Wed Nov 24 21:33:00 2004 UTC

# Line 38 | Line 38
38   #define STR_DEFINE(t, s) t = MK_STR(s)
39  
40   #include <string>
41 < #include <utilities>
41 > #include <utility>
42  
43 #include "utils/Tuple.hpp"
44 #include "types/ShapeAtomType.hpp"
43   #include "io/basic_ifstrstream.hpp"
44   #include "utils/TypeContainer.hpp"
45 + #include "types/AtomType.hpp"
46 + #include "types/BondType.hpp"
47 + #include "types/BendType.hpp"
48 + #include "types/TorsionType.hpp"
49  
50   namespace oopse {
51  
52   /**
53 < * @class ForceFiled ForceField.hpp ''UseTheForce/ForceField.hpp"
53 > * @class ForceField ForceField.hpp ''UseTheForce/ForceField.hpp"
54   * @brief
55   */
56   class ForceField{
57  
58      public:
59  
60 +        typedef TypeContainer<AtomType, 1> AtomTypeContainer;
61 +        typedef TypeContainer<BondType, 2> BondTypeContainer;
62 +        typedef TypeContainer<BendType, 3> BendTypeContainer;
63 +        typedef TypeContainer<TorsionType, 4> TorsionTypeContainer;
64 +        
65          ForceField();
66  
67 <        virtual ~ForceFields(){}
67 >        virtual ~ForceField(){}
68  
69          void setVariant(const std::string &variant) {
70              hasVariant_ = true;
# Line 73 | Line 80 | class ForceField{
80          TorsionType* getTorsionType(const std::string &at1, const std::string &at2,
81                                            const std::string &at3, const std::string &at4);
82  
83 +        BondType* getExactBondType(const std::string &at1, const std::string &at2);
84 +        BendType* getExactBendType(const std::string &at1, const std::string &at2,
85 +                                    const std::string &at3);
86 +        TorsionType* getExactTorsionType(const std::string &at1, const std::string &at2,
87 +                                          const std::string &at3, const std::string &at4);
88 +
89 +
90          //avoid make virtual function public
91          //Herb Sutter and Andrei Alexandrescu, C++ coding Standards, Addision-Wesley
92          virtual double getRcutFromAtomType(AtomType* at);
# Line 87 | Line 101 | class ForceField{
101  
102      protected:
103          
104 <        void addAtomType(const std::string &at, AtomType* atomType);
105 <        void addBondType(const std::string &at1, const std::string &at2, BondType* bondType);
106 <        void addBendType(const std::string &at1, const std::string &at2,
104 >        bool addAtomType(const std::string &at, AtomType* atomType);
105 >        bool addBondType(const std::string &at1, const std::string &at2, BondType* bondType);
106 >        bool addBendType(const std::string &at1, const std::string &at2,
107                                      const std::string &at3, BendType* bendType);
108 <        void addTorsionType(const std::string &at1, const std::string &at2,
108 >        bool addTorsionType(const std::string &at1, const std::string &at2,
109                                            const std::string &at3, const std::string &at4, TorsionType* torsionType);
110  
111          ifstrstream* openForceFieldFile(const std::string& filename);
112 +
113 +        unsigned int getNAtomType() {
114 +            return atomTypeCont_.size();
115 +        }
116 +        
117 +    protected:
118 +
119 +        AtomTypeContainer atomTypeCont_;    
120 +        BondTypeContainer bondTypeCont_;
121 +        BendTypeContainer bendTypeCont_;
122 +        TorsionTypeContainer torsionTypeCont_;
123 +        
124      private:  
125          std::string ffPath_;
126          bool hasVariant_;
# Line 102 | Line 128 | class ForceField{
128  
129          std::string wildCardAtomTypeName_;
130  
105        typedef TypeContainer<AtomType, 1> AtomTypeContainer;
106        typedef TypeContainer<BondType, 2> BondTypeContainer;
107        typedef TypeContainer<BendType, 3> BendTypeContainer;
108        typedef TypeContainer<TorsionType, 4> TorsionTypeContainer;
109
110        AtomTypeContainer atomTypeCont_;    
111        BondTypeContainer bondTypeCont_;
112        BendTypeContainer bendTypeCont_;
113        TorsionTypeContainer torsionTypeCont_;
131   };
132  
116 typedef GenericFactory<ForceField> ForceFieldFactory;
133  
134   }//end namespace oopse
135   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines