From 4739c144ee2933254735977e0c66ae9ea5e5b8b9 Mon Sep 17 00:00:00 2001 From: Gareth Aneurin Tribello Date: Wed, 22 May 2024 13:05:49 +0100 Subject: [PATCH] Changed names of actions created by the XAngles shortcut to ensure that an input on the nest continues working --- src/multicolvar/XAngle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/multicolvar/XAngle.cpp b/src/multicolvar/XAngle.cpp index b567a866d3..63775f2b13 100644 --- a/src/multicolvar/XAngle.cpp +++ b/src/multicolvar/XAngle.cpp @@ -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; @@ -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");