ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/primitives/StuntDouble.hpp
(Generate patch)

Comparing branches/development/src/primitives/StuntDouble.hpp (file contents):
Revision 1627 by gezelter, Tue Sep 13 22:05:04 2011 UTC vs.
Revision 1714 by gezelter, Sat May 19 18:12:46 2012 UTC

# Line 36 | Line 36
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, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   /**
# Line 848 | Line 849 | namespace OpenMD{
849        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).particlePot[localIndex_] += particlePot;
850      }      
851  
851
852      /**
853 <     * Returns the previous z-angle of this stuntDouble
854 <     * @return the z-angle of this stuntDouble
853 >     * Returns the previous fluctuating charge of this stuntDouble
854 >     * @return the fluctuating charge of this stuntDouble
855       */    
856 <    RealType getPrevZangle() {
857 <      return ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_];
856 >    RealType getPrevFlucQPos() {
857 >      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_];
858      }
859        
860      /**
861 <     * Returns the current z-angle of this stuntDouble
862 <     * @return the z-angle of this stuntDouble
861 >     * Returns the current fluctuating charge of this stuntDouble
862 >     * @return the fluctuating charge of this stuntDouble
863       */    
864 <    RealType getZangle() {
865 <      return ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_];
864 >    RealType getFlucQPos() {
865 >      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_];
866      }
867  
868      /**
869 <     * Returns the z-angle of this stuntDouble in specified snapshot
870 <     * @return the z-angle of this stuntDouble
869 >     * Returns the fluctuating charge of this stuntDouble in specified snapshot
870 >     * @return the fluctuating charge of this stuntDouble
871       * @param snapshotNo
872       */    
873 <    RealType getZangle(int snapshotNo) {
874 <      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_];
873 >    RealType getFlucQPos(int snapshotNo) {
874 >      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_];
875      }
876  
877      /**
878 <     * Sets  the previous z-angle of this stuntDouble
879 <     * @param angle  new z-angle
880 <     * @see #getZangle
878 >     * Sets  the previous fluctuating charge of this stuntDouble
879 >     * @param charge  new fluctuating charge
880 >     * @see #getflucQPos
881       */        
882 <    void setPrevZangle(RealType angle) {
883 <      ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] = angle;
882 >    void setPrevFlucQPos(RealType charge) {
883 >      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] = charge;
884      }
885        
886      /**
887 <     * Sets  the current z-angle of this stuntDouble
888 <     * @param angle  new z-angle
887 >     * Sets  the current fluctuating charge of this stuntDouble
888 >     * @param charge  new fluctuating charge
889       */        
890 <    void setZangle(RealType angle) {
891 <      ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] = angle;
890 >    void setFlucQPos(RealType charge) {
891 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] = charge;
892      }
893  
894      /**
895 <     * Sets  the z-angle of this stuntDouble in specified snapshot
896 <     * @param angle z-angle to be set
895 >     * Sets  the fluctuating charge of this stuntDouble in specified snapshot
896 >     * @param charge fluctuating charge to be set
897       * @param snapshotNo
898 <     * @see #getZangle
898 >     * @see #getflucQPos
899       */        
900 <    void setZangle(RealType angle, int snapshotNo) {
901 <      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] = angle;
900 >    void setFlucQPos(RealType charge, int snapshotNo) {
901 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] = charge;
902      }
903  
904      /**
905 <     * Adds z-angle into the previous z-angle of this stuntDouble
906 <     * @param angle  new z-angle
907 <     * @see #getZangle
905 >     * Adds fluctuating charge into the previous fluctuating charge of this stuntDouble
906 >     * @param charge  new fluctuating charge
907 >     * @see #getflucQPos
908       */        
909 <    void addPrevZangle(RealType angle) {
910 <      ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] += angle;
909 >    void addPrevFlucQPos(RealType charge) {
910 >      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] += charge;
911      }
912        
913      /**
914 <     * Adds z-angle into the current z-angle of this stuntDouble
915 <     * @param angle  new z-angle
914 >     * Adds fluctuating charge into the current fluctuating charge of this stuntDouble
915 >     * @param charge  new fluctuating charge
916       */        
917 <    void addZangle(RealType angle) {
918 <      ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] += angle;
917 >    void addFlucQPos(RealType charge) {
918 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQPos[localIndex_] += charge;
919      }
920  
921      /**
922 <     * Adds z-angle into the z-angle of this stuntDouble in specified snapshot
923 <     * @param angle z-angle to be add
922 >     * Adds fluctuating charge into the fluctuating charge of this stuntDouble in specified snapshot
923 >     * @param value fluctuating charge to be add
924       * @param snapshotNo
925 <     * @see #getZangle
925 >     * @see #getflucQPos
926       */        
927 <    void addZangle(RealType angle, int snapshotNo) {
928 <      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] += angle;
927 >    void addflucQPos(RealType charge, int snapshotNo) {
928 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] += charge;
929 >    }      
930 >
931 >
932 >    /**
933 >     * Returns the previous charge velocity of this stuntDouble
934 >     * @return the charge velocity of this stuntDouble
935 >     */    
936 >    RealType getPrevFlucQVel() {
937 >      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_];
938 >    }
939 >      
940 >    /**
941 >     * Returns the current charge velocity of this stuntDouble
942 >     * @return the charge velocity of this stuntDouble
943 >     */    
944 >    RealType getFlucQVel() {
945 >      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_];
946 >    }
947 >
948 >    /**
949 >     * Returns the charge velocity of this stuntDouble in specified snapshot
950 >     * @return the charge velocity of this stuntDouble
951 >     * @param snapshotNo
952 >     */    
953 >    RealType getFlucQVel(int snapshotNo) {
954 >      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_];
955 >    }
956 >
957 >    /**
958 >     * Sets  the previous charge velocity of this stuntDouble
959 >     * @param cvel  new charge velocity
960 >     * @see #getflucQVel
961 >     */        
962 >    void setPrevFlucQVel(RealType cvel) {
963 >      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] = cvel;
964 >    }
965 >      
966 >    /**
967 >     * Sets  the current charge velocity of this stuntDouble
968 >     * @param cvel  new charge velocity
969 >     */        
970 >    void setFlucQVel(RealType cvel) {
971 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] = cvel;
972 >    }
973 >
974 >    /**
975 >     * Sets  the charge velocity of this stuntDouble in specified snapshot
976 >     * @param cvel charge velocity to be set
977 >     * @param snapshotNo
978 >     * @see #getflucQVel
979 >     */        
980 >    void setFlucQVel(RealType cvel, int snapshotNo) {
981 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] = cvel;
982 >    }
983 >
984 >    /**
985 >     * Adds charge velocity into the previous charge velocity of this stuntDouble
986 >     * @param cvel  new charge velocity
987 >     * @see #getflucQVel
988 >     */        
989 >    void addPrevFlucQVel(RealType cvel) {
990 >      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] += cvel;
991 >    }
992 >      
993 >    /**
994 >     * Adds charge velocity into the current charge velocity of this stuntDouble
995 >     * @param cvel  new charge velocity
996 >     */        
997 >    void addFlucQVel(RealType cvel) {
998 >      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQVel[localIndex_] += cvel;
999 >    }
1000 >
1001 >    /**
1002 >     * Adds charge velocity into the charge velocity of this stuntDouble in specified snapshot
1003 >     * @param value charge velocity to be add
1004 >     * @param snapshotNo
1005 >     * @see #getflucQVel
1006 >     */        
1007 >    void addflucQVel(RealType cvel, int snapshotNo) {
1008 >      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] += cvel;
1009      }      
1010  
1011 +
1012 +    /**
1013 +     * Returns the previous charge force of this stuntDouble
1014 +     * @return the charge force of this stuntDouble
1015 +     */    
1016 +    RealType getPrevFlucQFrc() {
1017 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_];
1018 +    }
1019 +      
1020 +    /**
1021 +     * Returns the current charge force of this stuntDouble
1022 +     * @return the charge force of this stuntDouble
1023 +     */    
1024 +    RealType getFlucQFrc() {
1025 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_];
1026 +    }
1027 +
1028 +    /**
1029 +     * Returns the charge force of this stuntDouble in specified snapshot
1030 +     * @return the charge force of this stuntDouble
1031 +     * @param snapshotNo
1032 +     */    
1033 +    RealType getFlucQFrc(int snapshotNo) {
1034 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_];
1035 +    }
1036 +
1037 +    /**
1038 +     * Sets  the previous charge force of this stuntDouble
1039 +     * @param cfrc  new charge force
1040 +     * @see #getflucQFrc
1041 +     */        
1042 +    void setPrevFlucQFrc(RealType cfrc) {
1043 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc;
1044 +    }
1045 +      
1046 +    /**
1047 +     * Sets  the current charge force of this stuntDouble
1048 +     * @param cfrc  new charge force
1049 +     */        
1050 +    void setFlucQFrc(RealType cfrc) {
1051 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc;
1052 +    }
1053 +
1054 +    /**
1055 +     * Sets  the charge force of this stuntDouble in specified snapshot
1056 +     * @param cfrc charge force to be set
1057 +     * @param snapshotNo
1058 +     * @see #getflucQFrc
1059 +     */        
1060 +    void setFlucQFrc(RealType cfrc, int snapshotNo) {
1061 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] = cfrc;
1062 +    }
1063 +
1064 +    /**
1065 +     * Adds charge force into the previous charge force of this stuntDouble
1066 +     * @param cfrc  new charge force
1067 +     * @see #getflucQFrc
1068 +     */        
1069 +    void addPrevFlucQFrc(RealType cfrc) {
1070 +      ((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
1071 +    }
1072 +      
1073 +    /**
1074 +     * Adds charge force into the current charge force of this stuntDouble
1075 +     * @param cfrc  new charge force
1076 +     */        
1077 +    void addFlucQFrc(RealType cfrc) {
1078 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc;
1079 +    }
1080 +
1081 +    /**
1082 +     * Adds charge force into the charge force of this stuntDouble in specified snapshot
1083 +     * @param value charge force to be add
1084 +     * @param snapshotNo
1085 +     * @see #getflucQFrc
1086 +     */        
1087 +    void addflucQFrc(RealType cfrc, int snapshotNo) {
1088 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] += cfrc;
1089 +    }      
1090 +
1091 +
1092 +    /**
1093 +     * Returns the previous electric field of this stuntDouble
1094 +     * @return the electric field of this stuntDouble
1095 +     */    
1096 +    Vector3d getPrevElectricField() {
1097 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_];
1098 +    }
1099 +      
1100 +    /**
1101 +     * Returns the current electric field of this stuntDouble
1102 +     * @return the electric field of this stuntDouble
1103 +     */    
1104 +    Vector3d getElectricField() {
1105 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_];
1106 +    }
1107 +
1108 +    /**
1109 +     * Returns the electric field of this stuntDouble in specified snapshot
1110 +     * @return the electric field of this stuntDouble
1111 +     * @param snapshotNo
1112 +     */    
1113 +    Vector3d getElectricField(int snapshotNo) {
1114 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_];
1115 +    }
1116 +
1117 +    /**
1118 +     * Sets  the previous electric field of this stuntDouble
1119 +     * @param pos  new electric field
1120 +     * @see #getElectricField
1121 +     */        
1122 +    void setPrevElectricField(const Vector3d& pos) {
1123 +      ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = pos;
1124 +    }
1125 +      
1126 +    /**
1127 +     * Sets  the current electric field of this stuntDouble
1128 +     * @param pos  new electric field
1129 +     */        
1130 +    void setElectricField(const Vector3d& pos) {
1131 +      DataStorage&  data = snapshotMan_->getCurrentSnapshot()->*storage_;
1132 +      data.electricField[localIndex_] = pos;
1133 +      //((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = pos;
1134 +    }
1135 +
1136 +    /**
1137 +     * Sets  the electric field of this stuntDouble in specified snapshot
1138 +     * @param pos electric field to be set
1139 +     * @param snapshotNo
1140 +     * @see #getElectricField
1141 +     */        
1142 +    void setElectricField(const Vector3d& pos, int snapshotNo) {
1143 +
1144 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = pos;
1145 +
1146 +    }
1147 +
1148 +
1149      /** Set the force of this stuntDouble to zero */
1150      void zeroForcesAndTorques();
1151      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines