Skip to content

Commit

Permalink
Changed names of actions created by the XAngles shortcut to ensure th…
Browse files Browse the repository at this point in the history
…at an input on the nest continues working
  • Loading branch information
Gareth Aneurin Tribello committed May 22, 2024
1 parent 43c263d commit 4739c14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/multicolvar/XAngle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ XAngle::XAngle(const ActionOptions& ao):
ActionShortcut(ao)
{
// Create distances
std::string dline = getShortcutLabel() + ": DISTANCE COMPONENTS";
std::string dline = getShortcutLabel() + "_dists: DISTANCE COMPONENTS";
for(unsigned i=1;; ++i) {
std::string atstring; parseNumbered("ATOMS",i,atstring);
if( atstring.length()==0 ) break;
Expand All @@ -85,11 +85,11 @@ XAngle::XAngle(const ActionOptions& ao):
}
readInputLine( dline );
// Normalize the vectors
readInputLine( getShortcutLabel() + "_norm2: COMBINE ARG=" + getShortcutLabel() + ".x" + "," + getShortcutLabel() + ".y," + getShortcutLabel() + ".z POWERS=2,2,2 PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm2: COMBINE ARG=" + getShortcutLabel() + "_dists.x" + "," + getShortcutLabel() + "_dists.y," + getShortcutLabel() + "_dists.z POWERS=2,2,2 PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm: CUSTOM ARG=" + getShortcutLabel() + "_norm2 FUNC=sqrt(x) PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_x: CUSTOM ARG=" + getShortcutLabel() + ".x," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_y: CUSTOM ARG=" + getShortcutLabel() + ".y," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_z: CUSTOM ARG=" + getShortcutLabel() + ".z," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_x: CUSTOM ARG=" + getShortcutLabel() + "_dists.x," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_y: CUSTOM ARG=" + getShortcutLabel() + "_dists.y," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
readInputLine( getShortcutLabel() + "_norm_z: CUSTOM ARG=" + getShortcutLabel() + "_dists.z," + getShortcutLabel() + "_norm FUNC=x/y PERIODIC=NO");
// Now compute the angles with matheval
if( getName()=="XANGLES" ) readInputLine( getShortcutLabel() + "_ang: CUSTOM FUNC=acos(x) PERIODIC=NO ARG=" + getShortcutLabel() + "_norm_x");
if( getName()=="YANGLES" ) readInputLine( getShortcutLabel() + "_ang: CUSTOM FUNC=acos(x) PERIODIC=NO ARG=" + getShortcutLabel() + "_norm_y");
Expand Down

0 comments on commit 4739c14

Please sign in to comment.