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
b468b706
There was an error fetching the commit references. Please try again later.
Commit
b468b706
authored
13 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
Added possibility to compute torsion on a different axis
See TORSION manual.
parent
f0a3576e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ColvarTorsion.cpp
+30
-4
30 additions, 4 deletions
src/ColvarTorsion.cpp
with
30 additions
and
4 deletions
src/ColvarTorsion.cpp
+
30
−
4
View file @
b468b706
...
@@ -12,14 +12,24 @@ namespace PLMD{
...
@@ -12,14 +12,24 @@ namespace PLMD{
//+PLUMEDOC COLVAR TORSION
//+PLUMEDOC COLVAR TORSION
/**
/**
Calculate the torsion between four atoms
Calculate the torsion between four atoms.
\par Syntax
\par Syntax
\verbatim
\verbatim
TORSION ATOMS=
x,y,z,t
[PBC]
TORSION ATOMS=
a0,a1,a2,a3
[PBC]
\endverbatim
\endverbatim
If the PBC flag is present, distance is computed using periodic boundary conditions.
If the PBC flag is present, distance is computed using periodic boundary conditions.
Alternatively, compute the angle between two vectors projected on the plane
orthogonal to an axis, such as
\verbatim
TORSION V1=a0,a1 AXIS=a2,a3 V2=a4,a5
\endverbatim
Thus, two following variables are exactly the same one:
\verbatim
TORSION ATOMS=a0,a1,a2,a3
TORSION V1=a1,a0 AXIS=a1,a2 V2=a2,a3
\endverbatim
*/
*/
//+ENDPLUMEDOC
//+ENDPLUMEDOC
...
@@ -38,8 +48,12 @@ ColvarTorsion::ColvarTorsion(const ActionOptions&ao):
...
@@ -38,8 +48,12 @@ ColvarTorsion::ColvarTorsion(const ActionOptions&ao):
PLUMED_COLVAR_INIT
(
ao
),
PLUMED_COLVAR_INIT
(
ao
),
pbc
(
true
)
pbc
(
true
)
{
{
vector
<
AtomNumber
>
atoms
;
vector
<
AtomNumber
>
atoms
,
v1
,
v2
,
axis
;
parseAtomList
(
"ATOMS"
,
atoms
);
parseAtomList
(
"ATOMS"
,
atoms
);
parseAtomList
(
"VECTOR1"
,
v1
);
parseAtomList
(
"VECTOR2"
,
v2
);
parseAtomList
(
"AXIS"
,
axis
);
bool
nopbc
=!
pbc
;
bool
nopbc
=!
pbc
;
parseFlag
(
"NOPBC"
,
nopbc
);
parseFlag
(
"NOPBC"
,
nopbc
);
pbc
=!
nopbc
;
pbc
=!
nopbc
;
...
@@ -47,12 +61,24 @@ pbc(true)
...
@@ -47,12 +61,24 @@ pbc(true)
checkRead
();
checkRead
();
if
(
atoms
.
size
()
==
4
){
if
(
atoms
.
size
()
==
4
){
assert
(
v1
.
size
()
==
0
&&
v2
.
size
()
==
0
&&
axis
.
size
()
==
0
);
log
.
printf
(
" between atoms %d %d %d %d
\n
"
,
atoms
[
0
].
serial
(),
atoms
[
1
].
serial
(),
atoms
[
2
].
serial
(),
atoms
[
3
].
serial
());
log
.
printf
(
" between atoms %d %d %d %d
\n
"
,
atoms
[
0
].
serial
(),
atoms
[
1
].
serial
(),
atoms
[
2
].
serial
(),
atoms
[
3
].
serial
());
atoms
.
resize
(
6
);
atoms
.
resize
(
6
);
atoms
[
5
]
=
atoms
[
3
];
atoms
[
5
]
=
atoms
[
3
];
atoms
[
4
]
=
atoms
[
2
];
atoms
[
4
]
=
atoms
[
2
];
atoms
[
3
]
=
atoms
[
2
];
atoms
[
3
]
=
atoms
[
2
];
atoms
[
2
]
=
atoms
[
1
];
atoms
[
2
]
=
atoms
[
1
];
}
else
if
(
atoms
.
size
()
==
0
){
assert
(
v1
.
size
()
==
2
&&
v2
.
size
()
==
2
&&
axis
.
size
()
==
2
);
log
.
printf
(
" between lines %d-%d and %d-%d, projected on the plane orthogonal to line %d-%d
\n
"
,
v1
[
0
].
serial
(),
v1
[
1
].
serial
(),
v2
[
0
].
serial
(),
v2
[
1
].
serial
(),
axis
[
0
].
serial
(),
axis
[
1
].
serial
());
atoms
.
resize
(
6
);
atoms
[
0
]
=
v1
[
1
];
atoms
[
1
]
=
v1
[
0
];
atoms
[
2
]
=
axis
[
0
];
atoms
[
3
]
=
axis
[
1
];
atoms
[
4
]
=
v2
[
0
];
atoms
[
5
]
=
v2
[
1
];
}
else
assert
(
0
);
}
else
assert
(
0
);
if
(
pbc
)
log
.
printf
(
" using periodic boundary conditions
\n
"
);
if
(
pbc
)
log
.
printf
(
" using periodic boundary conditions
\n
"
);
...
...
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