Commit 05bdbdf0 authored by Russell Luke's avatar Russell Luke
Browse files

moved the demos to TestSuite and organized the data in

InputData by problems.
parent ddb2914a
#Input, Output and Logfiles
problemName = '1PTQ'
inputFile = 'InputData/1PTQ.pdb' #in InputFiles directory
outputFile = '1PTQrecon.pdb'
#Parameters used by all variants of the algorithm
gapEps = 1e-5
maxIterations = 5000
P1Eps = 1e-12
P2Rank = 3
#Data simulation parameters
maxBondLength = 6
startingSeed = 2
replications = 1
from proxtoolbox.Problems import DRprotein
for rep in range(replications):
problem = DRprotein(problemName,startingSeed+rep)
problem.readInputFile(inputFile)
problem.addOutputFile(outputFile)
problem.setGapEps(gapEps)
problem.setMaxIterations(maxIterations)
problem.setP1Eps(P1Eps)
problem.setP2Rank(P2Rank)
problem.simulateNMR(maxBondLength)
problem.addAminoInfo()
problem.solve()
problem.printStats()
problem.savePDB()
#problem.saveJPG()
problem.show()
del problem
......@@ -98,11 +98,13 @@ don't forget to type
exit()
1''. For this example, we already done the hard work for you. This time we'll
run the ProxToolbox from using a "DRprotein_demo.py" script. You can peek inside it
run the ProxToolbox from using a "DRprotein_demo.py" script inside the TestSuite
subdirectory. You can peek inside it
by openning it by your favourite editor, or even simpler type
cat DRprotein_demo.py
from the prompt in the TestSuite directory.
See how its got all the algorithmic parameters already in the file. Pretty neat huh?
2''. Ok. Time to run the script! It going to take a bit longer... actually a lot longer
......@@ -110,6 +112,7 @@ than the first two examples (hours maybe). We can work on speeding it up later.
python3 DRprotein_demo.py
(again, from in the TestSuite subdirectory).
You should see some (boring) information about the problem instance, etc. While the algorithm
is running you a report of its progress even 10 iterations, and will stop when the relative
error drops below 10e-5.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment