Skip to Content.
Sympa Menu

opal - Re: [Opal] Gather all variables after ENDTRACK

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Gather all variables after ENDTRACK


Chronological Thread  
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
  • To: "Dr. Simon Friederich" <s.friederich AT uni-mainz.de>
  • Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Subject: Re: [Opal] Gather all variables after ENDTRACK
  • Date: Thu, 18 Mar 2021 19:36:18 +0000
  • Accept-language: en-US, de-CH
  • Authentication-results: localhost; iprev=pass (psi-seppmail1.ethz.ch) smtp.remote-ip=129.132.93.141; spf=pass smtp.mailfrom=psi.ch; dmarc=skipped

Hello Simon there is no such thing like a global in OPAL. 

You would need to use standard output together with VALUE for the 
Output of Expressions (see 10.4.5 in the manual). Then you would need
to parse the standard output file. 

Cheers A
------
Dr. sc. math. Andreas (Andy) Adelmann
Head a.i. Labor for Scientific Computing and Modelling 
Paul Scherrer Institut OHSA/ CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Zoom ID: 470-582-4086 Password: AdA
Zoom Link: https://ethz.zoom.us/j/4705824086?pwd=dFcvT1pMMGY0bHg0dTNncUNZZTJkZz09

-------------------------------------------------------
Friday: ETH HPK G 28   +41 44 633 3076
============================================
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 
============================================

On 18 Mar 2021, at 17:29, Dr. Simon Friederich <s.friederich AT uni-mainz.de> wrote:

Dear OPAL-Team,

I want to save all custom variables/parameters into a file after a simulation has finished.
Then I can look up e.g. the set quadrupole strength (I set this via a variable) for the specific run.

Do you think this is possible using the OPAL-syntax and, if so, can you suggest something? (In a python session i would properly do this using the "globals()" command. I was thinking of having a python-script reading all ".in"-files and filter their content for "REAL", "REAL VECTOR", and "STRING".)

The best would be to do this after "ENDTRACK;" because sometimes I overwrite variables inbetween (e.g. the zstart-parameter when using imported distributions; Thanks again to Christof for this hint, it's really handy).

Best regards
Simon

--
Dr. Simon Friederich
Helmholtz-Institut Mainz | Insitut für Kernphysik
Kollaboration ACID       | B
Johannes Gutenberg-Universität Mainz
Staudingerweg 18         | Johann-Joachim-Becherweg 45
55128 Mainz, Deutschland

Tel.: +49 (0)6131 39-23160
E-Mail: s.friederich AT uni-mainz.de






Archive powered by MHonArc 2.6.19.

Top of Page