-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainScript.jl
More file actions
executable file
·48 lines (42 loc) · 1.77 KB
/
MainScript.jl
File metadata and controls
executable file
·48 lines (42 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using ElementInformation
using ParsePDB
using ReciprocalSpace
using ReflectionDatasetAnalysis
using Gadfly
using Debug
using DataFrames
using Color
############ Main script #############
# User defined params
pdbFileNames = ["test.pdb"]
λ = 1.0
resLim = 5.0
#minRefinResBin = 100
numberOfResBins = 14
numOfTrans = 20
transformType = "move"
progressiveTrans = true
numOfBoxPlots = 3
numOfRefPlots = 3
refToPlot = Array[[8,6,4]]
refsToCompare = Array[[8,6,4],[6,6,8]]
minNumPlotPoints = 2000
boxPlots = int(round(linspace(1,numOfTrans,numOfBoxPlots)))
refPlots = int(round(linspace(1,numOfTrans,numOfRefPlots)))
plotCorrelationBins = false
pdbFileName = pdbFileNames[1]
pdbCode = createDirectory(pdbFileName)
hklList, origMols, resbins, elementDict, pdbInfo, unitcell = setupMoleculesAndReflections(pdbFileName, λ, resLim, numberOfResBins)
intDiffMat, newMols = performMoleculeTrans(pdbCode, λ, hklList, origMols, resbins, elementDict, unitcell, numOfTrans, transformType,
progressiveTrans, boxPlots, refPlots, numOfRefPlots, refToPlot, refsToCompare)
corArray, diffDist, diffRes = getRefDistancesAndCorrelations(intDiffMat, hklList, unitcell)
plotCorrelationGraphs(pdbCode, corArray, diffDist, diffRes, minNumPlotPoints, numberOfResBins, plotCorrelationBins)
writeCorrelationInfoToFile(pdbCode, corArray, diffDist, diffRes)
#resBinBoxPlot(pdbCode, datasetNum, resbins, hklChanged)
# ref1 = hklList[[3,1,-1]]
# ref2 = hklList[[1,-1,0]]
# plt1 = plotReflectionStrucFac(ref1, origMols, elementDict, false)
# plt2 = plotReflectionStrucFac(ref2, origMols, elementDict, false)
# draw(PDF("p1and2.pdf", 12inch, 6inch), hstack(plt1,plt2))
#writePDBFile(pdbCode, origMols, pdbInfo, "testpdbUnitCell.pdb")
#writePDBFile(pdbCode, unitcellMols, pdbInfo, "testpdbUnitCell2.pdb")