Skip to content

Commit 633ef45

Browse files
committed
...
1 parent 7c1ec2d commit 633ef45

File tree

3 files changed

+254
-0
lines changed

3 files changed

+254
-0
lines changed

man/man1/aflock.1

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.\" man page template. See intro.l for more stuff to use
2+
.\" see mdoc for list of valid commands
3+
.\" Convert with groff:
4+
.\" groff -m man -T xhtml aflock.1 > aflock.html
5+
.Dd May 20, 2019
6+
.Dt AFLOCK 1
7+
.Sh NAME
8+
.Nm aflock
9+
.Nd the contact assigner in chromflock.
10+
.Sh SYNOPSIS
11+
.Sy aflock
12+
.Op Fl A Fl Fl aFile Ar fname
13+
.Op Fl l Fl Fl low Ar th
14+
.Op Fl h Fl Fl high Ar th
15+
.Op Fl n Fl Fl nStruct Ar N
16+
.Op Fl R Fl Fl radius Ar R
17+
.Op Fl Q Fl Fl vq Ar q
18+
.Op Fl m Fl Fl mArgs Ar args
19+
.Op Fl I Fl Fl init
20+
.Op Fl F Fl Fl final
21+
.Op Fl U Fl Fl update
22+
.Op Fl B Fl Fl blockupdate
23+
.Op Fl S Fl Fl score
24+
.Op Fl Fl rpos Ar fname
25+
.Op Fl Fl prpos Ar fname
26+
.Ys
27+
.Sh DESCRIPTION
28+
.Nm aflock
29+
is to be used before, between and after
30+
.Nm mflock
31+
is used. Typically in a script generated by
32+
.Nm chromflock.
33+
.Nm aflock
34+
can be used to initialize
35+
.Ar N
36+
new structures (or actually their W matrices), it can also be used to
37+
update the W matrices by moving contacts between them, or to add more contacts to them.
38+
.Pp
39+
The contact probability matix, passed as the
40+
.Ar aFile
41+
is supposed to be a [NxN] symmetric matrix stored linearly and encoded as 'double'.
42+
Since the A matrix should be symmetric either row or column order will work.
43+
.Pp
44+
If the same radial preference is to be enforced for all structures, this can be passed directly as an argument to
45+
.Nm mflock
46+
(use the -mArgs argument).
47+
To assign a radial preference with some probability to each structure, use the --rpos and --prpos pair of arguments.
48+
That will generate a separate file with radial constrains for each structure which is updated in the same way as W by
49+
.Nm aflock.
50+
.Pp
51+
.Sh MODES
52+
There are three modes, in initialization mode (
53+
.Fl --init
54+
), the entries (m,n) where A_mn=1 are assigned to all W matrices.
55+
In update mode, (
56+
.Fl --update
57+
) the contact maps, W, are updated with more contacts, or the contacts are re-distributed among them.
58+
The finalization mode (
59+
.Fl --final
60+
) is used to creates some summary statistics.
61+
.Sh OPTIONS
62+
.\" Begin list, ends with .El
63+
.Bl -tag -width Fl
64+
.It Fl A Ar file , Fl Fl aFile Ar file
65+
Specifies a file that contains the contact probability matrix.
66+
.It Fl Q, Fl Fl vq Ar q
67+
Sets the volume quotient,
68+
.Ar q
69+
of the beads, i.e. how large the volume of all beads should be in contrast to the volume of the nucleus.
70+
By specifying a volume quotient, the bead radius will be set and hence it is not possible to use -Q and -R simultaneously.
71+
.It Fl l Ar th, Fl Fl low th
72+
Sets the lower threshold to use, i.e., the lowest values of A to use.
73+
.It Fl h Ar th, Fl Fl high th
74+
Sets the lower threshold to use, i.e., the highest values of A to use.
75+
.It Fl R Ar r0, Fl Fl radius Ar r0
76+
Sets the radius of all beads to
77+
Ar r0
78+
(they can't be set individually). Probably you would like to use
79+
.Fl Q
80+
instead.
81+
.It Fl m Ar args, Fl Fl mArgs Ar args
82+
Set the arguments to be used by mflock, these will be passed over to the file named mflock_jobs that will be created.
83+
.It Fl I, Fl Fl init
84+
Set the mode to initialization.
85+
.It Fl U, Fl Fl update
86+
Set the mode to update.
87+
.It Fl B, Fl Fl blockupdate
88+
Set the mode to update, and blocks failed contacts be assigned again.
89+
.It Fl F, Fl Fl final
90+
Set the mode to finialization.
91+
.It Fl h, Fl Fl help
92+
Show a brief help message.
93+
.It Fl Fl rpos Ar fname
94+
Specifies a file that contains the radial preferences for each bead. The file should be encoded as double.
95+
Only to be used together with --prpos.
96+
.It Fl Fl prpos Ar fname
97+
Specifies a file that contains the probability or proportion of structures that should have each radial constraint.
98+
The file should be encoded as double. Only to be used with --rpos.
99+
.El
100+
.Sh EXAMPLES
101+
See the script `/util/chromflock_gen`.
102+
.Ss Basic usage:
103+
Initialize 10,000 structures using the contact probability matrix in A.double and give the beads a total volume that is 20% of the nuclei.
104+
.Pp
105+
$ aflock --init --aFile A.double --nStruct 10000 --vq 0.02
106+
.Sh SEE ALSO
107+
chromflock, mflock

man/man1/chromflock.1

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.\" man page template. See intro.l for more stuff to use
2+
.TH CHROMFLOCK 1
3+
.SH NAME
4+
chromflock -- Initialize a script for running chromflock in the current directory.
5+
.SH DESCRIPTION
6+
Chromflock is used as the first step in generating an ensemble of structures. The purpose is to initiate a configuration file with default settings in the current directory.
7+
.PP
8+
.SH EXAMPLE
9+
10+
.SS Basic usage:
11+
.PP
12+
Replace nvim with something else if it isn't your favourite editor.
13+
.RS
14+
.nf
15+
.B $ mkdir 10000structures
16+
.B $ cd 10000structures
17+
.B $ # create chromflock_gen
18+
.B $ chromflock
19+
.B $ # edit settings and point to correct A-file and possible G-file.
20+
.B $ nvim chromflock_gen
21+
.B # Generate a (linear) batch script with everything to be run
22+
.B $ ./chromflock_gen
23+
.B # Run everything:
24+
.B $ ./chromflock_run
25+
.fi
26+
.RE
27+
.PP
28+
.SS TIPS
29+
.PP
30+
.RS
31+
Use screen or some other program to run chromflock in the background.
32+
This allows you to log out from a (remote) computer while chromflock is still running.
33+
.PP
34+
chromflock_run outputs some progress information to status.txt while running.
35+
.RE
36+
.SH SEE ALSO
37+
mflock, aflock

man/man1/mflock.1

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.\" man page template. See intro.l for more stuff to use
2+
.Dd May 21, 2019
3+
.Dt MFLOCK 1
4+
.Sh NAME
5+
.Nm mflock
6+
.Nd the molecular dynamics optimizer in chromflock.
7+
.Sh SYNOPSIS
8+
.Sy mflock
9+
.Op Fl w Fl Fl wFile Ar wFile
10+
.Op Fl L Fl Fl lFile Ar lFile
11+
.Op Fl x Fl Fl xFile Ar xfile
12+
.OP Fl o Fl Fl outFolder Ar folder
13+
.Op Fl e Fl Fl errstop Ar X
14+
.Op Fl g Fl Fl gradstop Ar X
15+
.Op Fl l Fl Fl linestop Ar X
16+
.Op Fl n Fl Fl maxiter Ar X
17+
.Op Fl t Fl Fl maxtime Ar X
18+
.Op Fl s Fl Fl seed Ar seed
19+
.Op Fl r Fl Fl rFile Ar rfile
20+
.Op Fl V Fl Fl kVol Ar kVol
21+
.Op Fl I Fl Fl kInt Ar kInt
22+
.Op Fl S Fl Fl kSph Ar kSph
23+
.Op Fl G Fl Fl kRad Ar kRad
24+
.Op Fl R Fl Fl radius Ar r0
25+
.Op Fl v Fl Fl verbose Ar level
26+
.Op Fl o Fl Fl oFolder Ar ofolder
27+
.Op Fl D Fl Fl dynamic
28+
.Op Fl z Fl Fl cmmz
29+
.Op Fl D Fl Fl dynamic
30+
.Ys
31+
.Sh DESCRIPTION
32+
mflock uses molecular dynamics to find a 3D structure based on a contact indication matrix
33+
W.
34+
For a complete description on how it is implemented, please see the documentation under 'doc/' in the source directory.
35+
In short: Verlet integration is used to update the positions of the beads which are under influence of a set of forces:
36+
a) Volume exclusion (beads should not overlap), controlled by
37+
.Ar kVol
38+
b) Spherical containment, that keeps the beads in the unit sphere, controlled by
39+
.Ar kSph
40+
c) Interaction forces that keeps beads with indicated contacts to be close to each others, controlled by
41+
.Ar kInt
42+
d) Possibly also a radial preference per bead, controlled by
43+
.Ar kRad
44+
By design all beads have to have the same size and the geometry is always in the unit sphere (radius=1).
45+
.Sh wFile
46+
The wFile contains
47+
W, a [NxN] size symmetric matrix stored linearly and encoded as 'uint8'.
48+
.Sh xFile
49+
The xFile contains 3D coordinates
50+
.Ar X
51+
that the molecular dynamics will start from. If not passed, beads will be placed randomly within the domain.
52+
Note that the parser is primitive and might fail if the xFile is edited without care.
53+
It reads comma separated values and does not accept headers, comments, etc.
54+
.Sh oFolder
55+
An output folder called 'cf_%05d/' will be created if no oFolder is specified.
56+
.Sh OPTIONS
57+
.Bl -tag -width Fl
58+
.It Fl w Fl Fl wFile Ar file
59+
Specifies the contact indicator matrix to be used where 1=contact, and 0=non contact. A force of kInt will be placed between beads that are in contact.
60+
.It Fl L Fl Fl lFile Ar file
61+
Specify a file with labels (chromosome) for the beads.
62+
.It Fl x Fl Fl xFile Ar file
63+
Specify a file with coordinates for the beads.
64+
.It Fl s Fl Fl seed Ar x
65+
Set a seed for the random number generator. If not time(NULL)*getpid() will be used.
66+
.It Fl r Fl Fl rFile Ar file
67+
Specify a file with radial information to be used with kRad
68+
.It Fl e Fl Fl errstop Ar x
69+
Set a stop condition on the error.
70+
.It Fl g Fl Fl gstop Ar x
71+
Set a condition for stopping on the gradient magnitude.
72+
.It Fl l Fl Fl ltol Ar x
73+
Set the line tolerance (only for Quasi-Newton)
74+
.It Fl n Fl Fl maxiter Ar n
75+
Set the number of iterations to be used.
76+
.It Fl t Fl Fl maxtime Ar t
77+
Limit the simulations in time
78+
.It Fl V Fl Fl kVol Ar k
79+
Set the volume exclusion force
80+
.It Fl I Fl Fl kInt Ar k
81+
Set the interaction force.
82+
.It Fl S Fl Fl kSph Ar k
83+
Set the force used to keep the beads in the domain.
84+
.It Fl G Fl Fl kRad Ar k
85+
Set the force for the radial guidance of the beads.
86+
.It Fl R Fl Fl radius Ar r0
87+
Set the bead radius.
88+
.It Fl v Fl Fl verbose Ar level
89+
Set verbosity level
90+
.It Fl o Fl Fl oFolder
91+
specify output folder
92+
.It Fl z Fl Fl cmmz
93+
Write compressed chimera files.
94+
.It Fl D Fl Fl dynamic
95+
Enable molecular dynamics (will be default in the future). If not a Quasi-Newton optimizer is used.
96+
.It Fl c Fl Fl compress
97+
Use chromosome compression.
98+
.It Fl a Fl Fl live
99+
Pops up a renderer that shows the beads during the simulation. Requires that mflock is compiled with SDL2.
100+
.It Fl h Fl Fl help
101+
Show a brief help message.
102+
.El
103+
.Sh EXAMPLES
104+
See the script `/util/chromflock_run`.
105+
.Ss Basic usage:
106+
Assume that you want to discard sequences in sequences.fa that are also in Chr1, then run:
107+
.Pp
108+
$ mflock --wFile ../W.uint8 --lFile ../L.uint8
109+
.Sh SEE ALSO
110+
chromflock, aflock

0 commit comments

Comments
 (0)