Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
f0151245
"wrappers/python/vscode:/vscode.git/clone" did not exist on "2a6a5edcfd4849b392cb7b8e752930cc4f4d2372"
Commit
f0151245
authored
Dec 13, 2012
by
Peter Eastman
Browse files
Serialization proxies were storing unnecessary information
parent
182eb10c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
23 deletions
+17
-23
plugins/amoeba/serialization/src/AmoebaAngleForceProxy.cpp
plugins/amoeba/serialization/src/AmoebaAngleForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaBondForceProxy.cpp
plugins/amoeba/serialization/src/AmoebaBondForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaGeneralizedKirkwoodForceProxy.cpp
...serialization/src/AmoebaGeneralizedKirkwoodForceProxy.cpp
+2
-2
plugins/amoeba/serialization/src/AmoebaInPlaneAngleForceProxy.cpp
...amoeba/serialization/src/AmoebaInPlaneAngleForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaMultipoleForceProxy.cpp
...ns/amoeba/serialization/src/AmoebaMultipoleForceProxy.cpp
+4
-6
plugins/amoeba/serialization/src/AmoebaOutOfPlaneBendForceProxy.cpp
...oeba/serialization/src/AmoebaOutOfPlaneBendForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaPiTorsionForceProxy.cpp
...ns/amoeba/serialization/src/AmoebaPiTorsionForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaStretchBendForceProxy.cpp
.../amoeba/serialization/src/AmoebaStretchBendForceProxy.cpp
+1
-1
plugins/amoeba/serialization/src/AmoebaTorsionTorsionForceProxy.cpp
...oeba/serialization/src/AmoebaTorsionTorsionForceProxy.cpp
+1
-3
plugins/amoeba/serialization/src/AmoebaVdwForceProxy.cpp
plugins/amoeba/serialization/src/AmoebaVdwForceProxy.cpp
+2
-4
plugins/amoeba/serialization/src/AmoebaWcaDispersionForceProxy.cpp
...moeba/serialization/src/AmoebaWcaDispersionForceProxy.cpp
+2
-2
No files found.
plugins/amoeba/serialization/src/AmoebaAngleForceProxy.cpp
View file @
f0151245
...
...
@@ -51,7 +51,7 @@ void AmoebaAngleForceProxy::serialize(const void* object, SerializationNode& nod
node
.
setDoubleProperty
(
"pentic"
,
force
.
getAmoebaGlobalAnglePentic
());
node
.
setDoubleProperty
(
"sextic"
,
force
.
getAmoebaGlobalAngleSextic
());
SerializationNode
&
bonds
=
node
.
createChildNode
(
"Angles"
).
setIntProperty
(
"size"
,
force
.
getNumAngles
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"Angles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumAngles
());
ii
++
)
{
int
particle1
,
particle2
,
particle3
;
double
distance
,
k
;
...
...
plugins/amoeba/serialization/src/AmoebaBondForceProxy.cpp
View file @
f0151245
...
...
@@ -48,7 +48,7 @@ void AmoebaBondForceProxy::serialize(const void* object, SerializationNode& node
node
.
setDoubleProperty
(
"cubic"
,
force
.
getAmoebaGlobalBondCubic
());
node
.
setDoubleProperty
(
"quartic"
,
force
.
getAmoebaGlobalBondQuartic
());
SerializationNode
&
bonds
=
node
.
createChildNode
(
"Bonds"
).
setIntProperty
(
"size"
,
force
.
getNumBonds
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"Bonds"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumBonds
());
ii
++
)
{
int
particle1
,
particle2
;
double
distance
,
k
;
...
...
plugins/amoeba/serialization/src/AmoebaGeneralizedKirkwoodForceProxy.cpp
View file @
f0151245
...
...
@@ -52,11 +52,11 @@ void AmoebaGeneralizedKirkwoodForceProxy::serialize(const void* object, Serializ
node
.
setDoubleProperty
(
"GeneralizedKirkwoodSurfaceAreaFactor"
,
force
.
getSurfaceAreaFactor
()
);
node
.
setIntProperty
(
"GeneralizedKirkwoodIncludeCavityTerm"
,
force
.
getIncludeCavityTerm
()
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"GeneralizedKirkwoodParticles"
).
setIntProperty
(
"size"
,
force
.
getNumParticles
()
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"GeneralizedKirkwoodParticles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumParticles
());
ii
++
)
{
double
radius
,
charge
,
scalingFactor
;
force
.
getParticleParameters
(
ii
,
charge
,
radius
,
scalingFactor
);
particles
.
createChildNode
(
"Particle"
).
setIntProperty
(
"index"
,
ii
).
setDoubleProperty
(
"charge"
,
charge
).
setDoubleProperty
(
"radius"
,
radius
).
setDoubleProperty
(
"scaleFactor"
,
scalingFactor
);
particles
.
createChildNode
(
"Particle"
).
setDoubleProperty
(
"charge"
,
charge
).
setDoubleProperty
(
"radius"
,
radius
).
setDoubleProperty
(
"scaleFactor"
,
scalingFactor
);
}
}
...
...
plugins/amoeba/serialization/src/AmoebaInPlaneAngleForceProxy.cpp
View file @
f0151245
...
...
@@ -51,7 +51,7 @@ void AmoebaInPlaneAngleForceProxy::serialize(const void* object, SerializationNo
node
.
setDoubleProperty
(
"pentic"
,
force
.
getAmoebaGlobalInPlaneAnglePentic
());
node
.
setDoubleProperty
(
"sextic"
,
force
.
getAmoebaGlobalInPlaneAngleSextic
());
SerializationNode
&
bonds
=
node
.
createChildNode
(
"InPlaneAngles"
).
setIntProperty
(
"size"
,
force
.
getNumAngles
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"InPlaneAngles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumAngles
());
ii
++
)
{
int
particle1
,
particle2
,
particle3
,
particle4
;
double
distance
,
k
;
...
...
plugins/amoeba/serialization/src/AmoebaMultipoleForceProxy.cpp
View file @
f0151245
...
...
@@ -56,8 +56,6 @@ static void getCovalentTypes( std::vector<std::string>& covalentTypes ){
static
void
addCovalentMap
(
SerializationNode
&
particleExclusions
,
int
particleIndex
,
std
::
string
mapName
,
std
::
vector
<
int
>
covalentMap
){
SerializationNode
&
map
=
particleExclusions
.
createChildNode
(
mapName
);
map
.
setIntProperty
(
"index"
,
particleIndex
);
map
.
setIntProperty
(
"size"
,
covalentMap
.
size
()
);
for
(
unsigned
int
ii
=
0
;
ii
<
covalentMap
.
size
();
ii
++
)
{
map
.
createChildNode
(
"Cv"
).
setIntProperty
(
"v"
,
covalentMap
[
ii
]
);
}
...
...
@@ -93,7 +91,7 @@ void AmoebaMultipoleForceProxy::serialize(const void* object, SerializationNode&
std
::
vector
<
std
::
string
>
covalentTypes
;
getCovalentTypes
(
covalentTypes
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"MultipoleParticles"
).
setIntProperty
(
"size"
,
force
.
getNumMultipoles
()
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"MultipoleParticles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumMultipoles
());
ii
++
)
{
int
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
;
...
...
@@ -106,13 +104,13 @@ void AmoebaMultipoleForceProxy::serialize(const void* object, SerializationNode&
axisType
,
multipoleAtomZ
,
multipoleAtomX
,
multipoleAtomY
,
thole
,
dampingFactor
,
polarity
);
SerializationNode
&
particle
=
particles
.
createChildNode
(
"Particle"
);
particle
.
setIntProperty
(
"
index"
,
ii
).
setIntProperty
(
"
axisType"
,
axisType
).
setIntProperty
(
"multipoleAtomZ"
,
multipoleAtomZ
).
setIntProperty
(
"multipoleAtomX"
,
multipoleAtomX
).
setIntProperty
(
"multipoleAtomY"
,
multipoleAtomY
);
particle
.
setIntProperty
(
"axisType"
,
axisType
).
setIntProperty
(
"multipoleAtomZ"
,
multipoleAtomZ
).
setIntProperty
(
"multipoleAtomX"
,
multipoleAtomX
).
setIntProperty
(
"multipoleAtomY"
,
multipoleAtomY
);
particle
.
setDoubleProperty
(
"charge"
,
charge
).
setDoubleProperty
(
"thole"
,
thole
).
setDoubleProperty
(
"damp"
,
dampingFactor
).
setDoubleProperty
(
"polarity"
,
polarity
);
SerializationNode
&
dipole
=
particle
.
createChildNode
(
"Dipole"
).
setIntProperty
(
"size"
,
3
);
SerializationNode
&
dipole
=
particle
.
createChildNode
(
"Dipole"
);
dipole
.
setDoubleProperty
(
"d0"
,
molecularDipole
[
0
]
).
setDoubleProperty
(
"d1"
,
molecularDipole
[
1
]
).
setDoubleProperty
(
"d2"
,
molecularDipole
[
2
]
);
SerializationNode
&
quadrupole
=
particle
.
createChildNode
(
"Quadrupole"
).
setIntProperty
(
"size"
,
9
);
SerializationNode
&
quadrupole
=
particle
.
createChildNode
(
"Quadrupole"
);
quadrupole
.
setDoubleProperty
(
"q0"
,
molecularQuadrupole
[
0
]
).
setDoubleProperty
(
"q1"
,
molecularQuadrupole
[
1
]
).
setDoubleProperty
(
"q2"
,
molecularQuadrupole
[
2
]
);
quadrupole
.
setDoubleProperty
(
"q3"
,
molecularQuadrupole
[
3
]
).
setDoubleProperty
(
"q4"
,
molecularQuadrupole
[
4
]
).
setDoubleProperty
(
"q5"
,
molecularQuadrupole
[
5
]
);
quadrupole
.
setDoubleProperty
(
"q6"
,
molecularQuadrupole
[
6
]
).
setDoubleProperty
(
"q7"
,
molecularQuadrupole
[
7
]
).
setDoubleProperty
(
"q8"
,
molecularQuadrupole
[
8
]
);
...
...
plugins/amoeba/serialization/src/AmoebaOutOfPlaneBendForceProxy.cpp
View file @
f0151245
...
...
@@ -49,7 +49,7 @@ void AmoebaOutOfPlaneBendForceProxy::serialize(const void* object, Serialization
node
.
setDoubleProperty
(
"pentic"
,
force
.
getAmoebaGlobalOutOfPlaneBendPentic
());
node
.
setDoubleProperty
(
"sextic"
,
force
.
getAmoebaGlobalOutOfPlaneBendSextic
());
SerializationNode
&
bonds
=
node
.
createChildNode
(
"OutOfPlaneBend"
).
setIntProperty
(
"size"
,
force
.
getNumOutOfPlaneBends
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"OutOfPlaneBend"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumOutOfPlaneBends
());
ii
++
)
{
int
particle1
,
particle2
,
particle3
,
particle4
;
double
k
;
...
...
plugins/amoeba/serialization/src/AmoebaPiTorsionForceProxy.cpp
View file @
f0151245
...
...
@@ -44,7 +44,7 @@ AmoebaPiTorsionForceProxy::AmoebaPiTorsionForceProxy() : SerializationProxy("Amo
void
AmoebaPiTorsionForceProxy
::
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
{
node
.
setIntProperty
(
"version"
,
1
);
const
AmoebaPiTorsionForce
&
force
=
*
reinterpret_cast
<
const
AmoebaPiTorsionForce
*>
(
object
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"PiTorsion"
).
setIntProperty
(
"size"
,
force
.
getNumPiTorsions
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"PiTorsion"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumPiTorsions
());
ii
++
)
{
int
particle1
,
particle2
,
particle3
,
particle4
,
particle5
,
particle6
;
double
k
;
...
...
plugins/amoeba/serialization/src/AmoebaStretchBendForceProxy.cpp
View file @
f0151245
...
...
@@ -44,7 +44,7 @@ AmoebaStretchBendForceProxy::AmoebaStretchBendForceProxy() : SerializationProxy(
void
AmoebaStretchBendForceProxy
::
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
{
node
.
setIntProperty
(
"version"
,
1
);
const
AmoebaStretchBendForce
&
force
=
*
reinterpret_cast
<
const
AmoebaStretchBendForce
*>
(
object
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"StretchBendAngles"
).
setIntProperty
(
"size"
,
force
.
getNumStretchBends
()
);
SerializationNode
&
bonds
=
node
.
createChildNode
(
"StretchBendAngles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumStretchBends
());
ii
++
)
{
int
particle1
,
particle2
,
particle3
;
double
distanceAB
,
distanceCB
,
angle
,
k
;
...
...
plugins/amoeba/serialization/src/AmoebaTorsionTorsionForceProxy.cpp
View file @
f0151245
...
...
@@ -76,7 +76,6 @@ void AmoebaTorsionTorsionForceProxy::serialize(const void* object, Serialization
// value5 = F_xy partial f wrt x,y
SerializationNode
&
grids
=
node
.
createChildNode
(
"TorsionTorsionGrids"
);
grids
.
setIntProperty
(
"size"
,
static_cast
<
int
>
(
force
.
getNumTorsionTorsionGrids
()));
for
(
unsigned
int
kk
=
0
;
kk
<
static_cast
<
unsigned
int
>
(
force
.
getNumTorsionTorsionGrids
());
kk
++
)
{
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>
grid
=
force
.
getTorsionTorsionGrid
(
kk
);
...
...
@@ -87,11 +86,10 @@ void AmoebaTorsionTorsionForceProxy::serialize(const void* object, Serialization
gridCount
+=
grid
[
ii
].
size
();
}
SerializationNode
&
gridNode
=
grids
.
createChildNode
(
"TorsionTorsionGrid"
).
setIntProperty
(
"size"
,
static_cast
<
int
>
(
gridCount
)
);
SerializationNode
&
gridNode
=
grids
.
createChildNode
(
"TorsionTorsionGrid"
);
for
(
unsigned
int
ii
=
0
;
ii
<
grid
.
size
();
ii
++
)
{
SerializationNode
&
gridSerializationRow
=
gridNode
.
createChildNode
(
"RowNode"
);
gridSerializationRow
.
setIntProperty
(
"dim"
,
ii
);
gridSerializationRow
.
setIntProperty
(
"size"
,
static_cast
<
int
>
(
grid
[
ii
].
size
()
)
);
for
(
unsigned
int
jj
=
0
;
jj
<
grid
[
ii
].
size
();
jj
++
)
{
SerializationNode
&
gridSerializationColumnNode
=
gridSerializationRow
.
createChildNode
(
"ColumnNode"
);
gridSerializationColumnNode
.
setIntProperty
(
"dim"
,
jj
);
...
...
plugins/amoeba/serialization/src/AmoebaVdwForceProxy.cpp
View file @
f0151245
...
...
@@ -51,7 +51,7 @@ void AmoebaVdwForceProxy::serialize(const void* object, SerializationNode& node)
node
.
setIntProperty
(
"method"
,
(
int
)
force
.
getNonbondedMethod
());
SerializationNode
&
particles
=
node
.
createChildNode
(
"VdwParticles"
).
setIntProperty
(
"size"
,
force
.
getNumParticles
()
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"VdwParticles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumParticles
());
ii
++
)
{
int
ivIndex
;
...
...
@@ -59,14 +59,12 @@ void AmoebaVdwForceProxy::serialize(const void* object, SerializationNode& node)
force
.
getParticleParameters
(
ii
,
ivIndex
,
sigma
,
epsilon
,
reductionFactor
);
SerializationNode
&
particle
=
particles
.
createChildNode
(
"Particle"
);
particle
.
setIntProperty
(
"
index"
,
ii
).
setIntProperty
(
"
ivIndex"
,
ivIndex
).
setDoubleProperty
(
"sigma"
,
sigma
).
setDoubleProperty
(
"epsilon"
,
epsilon
).
setDoubleProperty
(
"reductionFactor"
,
reductionFactor
);
particle
.
setIntProperty
(
"ivIndex"
,
ivIndex
).
setDoubleProperty
(
"sigma"
,
sigma
).
setDoubleProperty
(
"epsilon"
,
epsilon
).
setDoubleProperty
(
"reductionFactor"
,
reductionFactor
);
std
::
vector
<
int
>
exclusions
;
force
.
getParticleExclusions
(
ii
,
exclusions
);
SerializationNode
&
particleExclusions
=
particle
.
createChildNode
(
"ParticleExclusions"
);
particleExclusions
.
setIntProperty
(
"size"
,
exclusions
.
size
()
);
particleExclusions
.
setIntProperty
(
"index"
,
ii
);
for
(
unsigned
int
jj
=
0
;
jj
<
exclusions
.
size
();
jj
++
)
{
particleExclusions
.
createChildNode
(
"excl"
).
setIntProperty
(
"index"
,
exclusions
[
jj
]
);
}
...
...
plugins/amoeba/serialization/src/AmoebaWcaDispersionForceProxy.cpp
View file @
f0151245
...
...
@@ -53,11 +53,11 @@ void AmoebaWcaDispersionForceProxy::serialize(const void* object, SerializationN
node
.
setDoubleProperty
(
"Dispoff"
,
force
.
getDispoff
());
node
.
setDoubleProperty
(
"Slevy"
,
force
.
getSlevy
());
SerializationNode
&
particles
=
node
.
createChildNode
(
"WcaDispersionParticles"
).
setIntProperty
(
"size"
,
force
.
getNumParticles
()
);
SerializationNode
&
particles
=
node
.
createChildNode
(
"WcaDispersionParticles"
);
for
(
unsigned
int
ii
=
0
;
ii
<
static_cast
<
unsigned
int
>
(
force
.
getNumParticles
());
ii
++
)
{
double
radius
,
epsilon
;
force
.
getParticleParameters
(
ii
,
radius
,
epsilon
);
particles
.
createChildNode
(
"Particle"
).
setIntProperty
(
"index"
,
ii
).
setDoubleProperty
(
"radius"
,
radius
).
setDoubleProperty
(
"epsilon"
,
epsilon
);
particles
.
createChildNode
(
"Particle"
).
setDoubleProperty
(
"radius"
,
radius
).
setDoubleProperty
(
"epsilon"
,
epsilon
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment