Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
71a0fd85
There was an error fetching the commit references. Please try again later.
Commit
71a0fd85
authored
7 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Added option to caclulate sum and made small change to Steinhardt to avoid if statements
parent
1599e129
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/crystallization/Steinhardt.cpp
+6
-2
6 additions, 2 deletions
src/crystallization/Steinhardt.cpp
src/multicolvar/ActionVolume.cpp
+1
-1
1 addition, 1 deletion
src/multicolvar/ActionVolume.cpp
with
7 additions
and
3 deletions
src/crystallization/Steinhardt.cpp
+
6
−
2
View file @
71a0fd85
...
...
@@ -99,14 +99,16 @@ void Steinhardt::calculateVector( multicolvar::AtomValuePack& myatoms ) const {
// The complex number of which we have to take powers
std
::
complex
<
double
>
com1
(
distance
[
0
]
/
dlen
,
distance
[
1
]
/
dlen
);
powered
=
std
::
complex
<
double
>
(
1.0
,
0.0
);
// Do stuff for all other m values
for
(
unsigned
m
=
1
;
m
<=
tmom
;
++
m
)
{
// Calculate Legendre Polynomial
poly_ass
=
deriv_poly
(
m
,
distance
[
2
]
/
dlen
,
dpoly_ass
);
// Calculate power of complex number
if
(
std
::
abs
(
com1
)
>
epsilon
)
powered
=
pow
(
com1
,
m
-
1
);
else
powered
=
std
::
complex
<
double
>
(
0.
,
0.
);
// if(std::abs(com1)>epsilon) powered=pow(com1,m-1);
// else if(m==1) powered=std::complex<double>(1.,0);
// else powered = std::complex<double>(0.,0.);
// Real and imaginary parts of z
real_z
=
real
(
com1
*
powered
);
imag_z
=
imag
(
com1
*
powered
);
...
...
@@ -140,6 +142,8 @@ void Steinhardt::calculateVector( multicolvar::AtomValuePack& myatoms ) const {
accumulateSymmetryFunction
(
2
+
tmom
-
m
,
i
,
pref
*
sw
*
tq6
,
pref
*
myrealvec
,
pref
*
Tensor
(
-
myrealvec
,
distance
),
myatoms
);
// Imaginary part
accumulateSymmetryFunction
(
2
+
ncomp
+
tmom
-
m
,
i
,
-
pref
*
sw
*
itq6
,
-
pref
*
myimagvec
,
pref
*
Tensor
(
myimagvec
,
distance
),
myatoms
);
// Calculate next power of complex number
powered
*=
com1
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/multicolvar/ActionVolume.cpp
+
1
−
1
View file @
71a0fd85
...
...
@@ -28,7 +28,7 @@ void ActionVolume::registerKeywords( Keywords& keys ) {
VolumeGradientBase
::
registerKeywords
(
keys
);
if
(
keys
.
reserved
(
"VMEAN"
)
)
keys
.
use
(
"VMEAN"
);
keys
.
use
(
"MEAN"
);
keys
.
use
(
"LESS_THAN"
);
keys
.
use
(
"MORE_THAN"
);
keys
.
use
(
"BETWEEN"
);
keys
.
use
(
"HISTOGRAM"
);
keys
.
use
(
"BETWEEN"
);
keys
.
use
(
"HISTOGRAM"
);
keys
.
use
(
"SUM"
);
keys
.
add
(
"compulsory"
,
"SIGMA"
,
"the width of the function to be used for kernel density estimation"
);
keys
.
add
(
"compulsory"
,
"KERNEL"
,
"gaussian"
,
"the type of kernel function to be used"
);
keys
.
addFlag
(
"OUTSIDE"
,
false
,
"calculate quantities for colvars that are on atoms outside the region of interest"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment