Skip to content

Commit 1ca8779

Browse files
Gareth Aneurin TribelloGareth Aneurin Tribello
Gareth Aneurin Tribello
authored and
Gareth Aneurin Tribello
committed
Fixed corner case to deal with loaded actions that replace actions in plumed with different syntax
1 parent 61e6521 commit 1ca8779

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

PlumedToHTML/PlumedFormatter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ def format(self, tokensource, outfile):
172172
for kkkk in self.keyword_dict[action]["syntax"] :
173173
if kkkk=="output" or self.keyword_dict[action]["syntax"][kkkk]["multiple"]==0 : continue
174174
if kkkk in value.strip() : foundkey, desc = True, self.keyword_dict[action]["syntax"][kkkk.upper()]["description"].split('.')[0]
175-
if not self.broken and not notooltips and not foundkey : raise Exception("keyword " + value.strip().upper() + " is not in syntax for action " + action )
175+
if not self.broken and not notooltips and not foundkey :
176+
if self.hasload : foundkey, desc = True, 'There is a possibity that this action is not part of PLUMED and was included by using a LOAD command. This LOADing replaces one of the actions that is in PLUMED. You should thus be wary of the documentation in these tooltips and look at the cpp file that was loaded <a href="' + self.keyword_dict["LOAD"]["hyperlink"] + '" style="color:green">More details</a><i></i></div></div>'
177+
else : raise Exception("keyword " + value.strip().upper() + " is not in syntax for action " + action )
176178
if desc=="" and self.broken : outfile.write( value )
177179
else : outfile.write('<div class="tooltip">' + value + '<div class="right">' + desc + '<i></i></div></div>')
178180
elif ttype==Name.Constant :

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name='PlumedToHTML',
9-
version='0.59',
9+
version='0.60',
1010
author="Gareth Tribello",
1111
author_email="gareth.tribello@gmail.com",
1212
description="A package for creating pretified HTML for PLUMED files",

0 commit comments

Comments
 (0)