openmolecules.org

 
Home » DataWarrior » Functionality » macro comments (can non-coding commentaries be included into the DW macros?)
macro comments [message #2270] Tue, 06 August 2024 13:35 Go to next message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
dear Thomas,

I missed in the Macro Editor any reference to helpful non-coding commentaries, similar to those existing in other computational languages. Did I missed the information in some other place?
...
Just in case, I tested: //, /*..*/, # and ' (used in other programs), but none of them worked in DW macros.

In case they are not yet considered, Would it be possible to include that possibility for DW macros?
It would be a great help for long codings...

Thank you for your attention
sincerly Julio


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Re: macro comments [message #2323 is a reply to message #2270] Wed, 23 October 2024 12:23 Go to previous messageGo to next message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
After trying many alternatives, the best way to include non-coded information on long DW macros may be to insert comments on "show message" tasks.
It may slow down the macro execution but have no other alternative to be somehow self-explanatory.

For example:

<task name="showMessage">
message= NOW THE VISIBLE ROWS WILL BE SAVED TO C:/....
</task>

Another example of use is included into the NTN macro for semi-automatically save all information on raw dwar and toxicity-filtered and mmff94s+ conformer sdf files for Vina, after running a DW Build Evolutionary Library

Hope it may serve to other DW macro-designers !
  • Attachment: NTN.dwam
    (Size: 1.69KB, Downloaded 26 times)


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Re: macro comments [message #2324 is a reply to message #2323] Thu, 24 October 2024 21:50 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
I support Julio's request with preference for a single-character to start a line comment. Percent sign, ! and C didn't work either. The attempt to introduce visual indentation (because renaming the task name in an editor renders the block useless), either with two explicit spaces per level of indentation like

<macro name="test">
<task name="addSmilesCodes">
structureColumn=Structure
</task>
<task name="calculateCompoundProperties">
  propertyList=totalWeight	logP
  structureColumn=Structure
</task>
</macro>
or with tabulator breaks everything in this indented block, too (a subsequent block without indentation will perform well).
Re: macro comments [message #2326 is a reply to message #2324] Sat, 26 October 2024 22:56 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Dear Julio,

sorry, I have missed this issue for today's update. But it will be in the next one. Macro task comments will look like the following. They are preceded by '#' and follow the task name tag. If you manually add a macro file and add comments at another position, they are moved automatically to the position where they belong. I will also add a user interface to edit task comments. From your point of view does that make sense?

<macro name="scaffoldReplacement">
<task name="replaceScaffoldAndLink">
# some comment
# more comment
# comment within properties
maxEVRMSD=0.15
atomsMore=10
maxEVDivergence=30.0
minPhesaFlex=0.5
query=fasqr@DXT@UoQRWT@dsJrkO~wLxYsSMTuUTuTRbdcQt@dDsdC}fRf TvuvL #qMuyMo_oLLndsZj?PexZoGsSI_YzAltBDxkdmtJHv_YzkL?VDJDYzGvmIo] NykalPWzRbHlGNMLXTKw~IMMxCWU_lWAjAEKrRSJFd^AqSq_yDz`@@eyz?tz AD}cG]B[\@GniCFI?nCbku]zHfkWW_CY[h|`tgx`dB|@xL?v\VP{^\GZyfve PxjXyDOpeTQe@tF\vP^kAS~|svKW~Ig?XbNREsryUnKDGYI[p?GmMeawJuw\ fR}bvD{_HQi`i}`htj~QoKgiwfABqNogOydGkOi\Asf|yCnr~~Skw|UmBCkg eBqhetK{XLz{[^fBWUQnttLrrCRdfI~zh`@R@Aw@@
atomsLess=5
inFile=/home/thomas/data/cod/cod-fragments_4to16.dwar
</task>
</macro>
Re: macro comments [message #2327 is a reply to message #2326] Sun, 27 October 2024 16:39 Go to previous message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
Dear Thomas,

wonderful to see this as prospective pattern in future releases.

Best regards,

Norwid
Previous Topic: python usage
Next Topic: polycyclic molecule displaying issue
Goto Forum:
  


Current Time: Fri Nov 22 06:25:39 CET 2024

Total time taken to generate the page: 0.03877 seconds