Open main menu

Changes

→‎Tutorial: Formatting improvements.
We run relax repeatedly, to execute code. Then we write new code in the script, and run again.
<source lang="bash">relax test.py</source>
When we are satisfied, one can then do like this.
Start relax
<source lang="bash">relax -g -t log.txt</source> 
Then do
User functions -> Script -> test.py
# Make ID.
ID500 = []
for f in flist500: ID500.append("500_"+f.split(".in_sparky")[0])
# Then read.
# Make ID.
ID500rep = []
for f in flist500rep: ID500rep.append("500_"+f.split(".in.bis_sparky")[0]+'b')
# Then read.
# Then check.
print (cdp.replicates)
# Then repeat for 800.
# Make ID.
ID800 = []
for f in flist800: ID800.append("800_"+f.split(".in_sparky")[0])
# Then read.
# Make ID.
ID800rep = []
for f in flist800rep: ID800rep.append("800_"+f.split(".in.bis_sparky")[0]+'b')
# Then read.
# Then check.
print (cdp.replicates)print ("%s %s %s %s" % (len(ID500), len(ID500rep), len(ID800), len(ID800rep)))
# Then set spectrum properties.
else:
vcpmg = float(vcpmg_str.split("b")[0])
print ("%s %s %s" % (cur_id, sfrq_str, vcpmg))
# Set the current experiment type.
Trusted, Bureaucrats
4,223

edits