pyBrown
is a bundle of tools useful for Brownian and Stokesian dynamics
simulations and subsequent analysis of the results.
Copyright ©2018- Tomasz Skóra [email protected]
- computing Mean Square Displacement
- computing Mean Square Angular Displacement and Mean Orientation Autocorrelation
- computing Radial Distribution Function
- structure (
.str
) files generation - Monte Carlo Excluded Volume computation
- diffusion/mobility/resistance matrix analysis
Type following commands in a terminal:
make
make test
- General remarks
- Generating structure files
- Trajectory analysis
- Monte Carlo Excluded Volume
- Pore Size Distribution
- Snapshot voxelization
Physical property | Units |
---|---|
Temperature | kelvin (K) |
Viscosity | poise (P) |
Time | picosecond (ps) |
Distance | Angstrom (Å) |
Required keywords:
"labels": [string, ...]
— bead labels in input XYZ file,"sizes": [integer, ...]
— numbers of beads representing individual entities,"box_size": float
— size of simulation (cubic) box (Å),"temperature": float
— temperature (K),"viscosity": float
— dynamic viscosity (P),"input_xyz_template": string
— template of input xyz filenames,"input_xyz_range": [integer, integer]
— the number range defining input xyz filenames.
pyBrown expects input xyz
files to follow a specific naming scheme:
..., (TEMPLATE)(NUMBER).xyz
, (TEMPLATE)(NUMBER).xyz
, ...
(where TEMPLATE is a string variable defined with the keyword "input_xyz_template"
and NUMBER is an integer from range defined with the keyword "input_xyz_range"
)
(Have in mind, that ranges in python are defined in such a way that the upper limit is not contained in a range. For example, range(1,4) returns [1, 2, 3] (without 4!).)
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
)"verbose": boolean
— print extra information (default:false
)"fit_MSD": boolean
— fit linear functions to the computed MSDs and plot them in the output figure (default:false
)"probing_frequency": integer
— read every N-th geometry (default:1
)"min_time:" float
— not include snapshots with time smaller than"min_time"
(default:0.0
)"mode": option
— learn more here (options:"direct"
/"window"
, default:window
)"float_type": option
— number of bits per float number (options:32
/64
, default:32
)
{
"labels": ["FIC", "DNA"],
"sizes": [1, 8],
"box_size": 750.0,
"temperature": 293.15,
"viscosity": 0.01005,
"input_xyz_template": "ficoll_41_DNA_14_",
"input_xyz_range": [1, 94],
"fit_MSD": true,
"verbose": true,
"debug": true,
"probing_frequency": 10,
"mode": "window"
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the MSD.py
program using following command:
python MSD.py input.json
Successful computations should produce:
(TEMPLATE)msd.txt
data file with MSD as a function of time,(TEMPLATE)msd.pdf
image file with MSD as a function of time (and optionally, linear fit),
Required keywords:
"input_enr_template": string
— template of input enr filenames,"input_enr_range": [integer, integer]
— the number range defining input enr filenames.
pyBrown expects input enr
files to follow a specific naming scheme:
..., (TEMPLATE)(NUMBER).enr
, (TEMPLATE)(NUMBER).enr
, ...
(where TEMPLATE is a string variable defined with the keyword "input_enr_template"
and NUMBER is an integer from range defined with the keyword "input_enr_range"
)
(Have in mind, that ranges in python are defined in such a way that the upper limit is not contained in a range. For example, range(1,4) returns [1, 2, 3] (without 4!).)
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
)"verbose": boolean
— print extra information (default:false
)"float_type": option
— number of bits per float number (options:32
/64
, default:32
)
{
"input_enr_template": "enzymes_double_1_",
"input_enr_range": [1, 11],
"verbose": false,
"debug": false
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the Energy.py
program using following command:
python Energy.py input.json
Successful computations should produce:
(TEMPLATE)enr.txt
data file with mean energy as a function of time,(TEMPLATE)enr.pdf
image file with mean energy as a function of time (and optionally, linear fit)
Required keywords:
-
"labels": [string, ...]
— bead labels in input XYZ file, -
"sizes": [integer, ...]
— numbers of beads representing individual entities, -
"box_size": float
— size of simulation (cubic) box (Å), -
"bin_range": [float, float]
— range of length values (Å) used to construct histogram bins; -
"number_of_bins": integer
— number of bins -
"input_xyz_template": string
— template of input xyz filenames, -
"input_xyz_range": [integer, integer]
— the number range defining input xyz filenames.
pyBrown expects input xyz
files to follow a specific naming scheme:
..., (TEMPLATE)(NUMBER).xyz
, (TEMPLATE)(NUMBER).xyz
, ...
(where TEMPLATE is a string variable defined with the keyword "input_xyz_template"
and NUMBER is an integer from range defined with the keyword "input_xyz_range"
)
(Have in mind, that ranges in python are defined in such a way that the upper limit is not contained in a range. For example, range(1,4) returns [1, 2, 3] (without 4!).)
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
)"verbose": boolean
— print extra information (default:false
)"probing_frequency": integer
— read every N-th geometry (default:1
)"min_time:" float
— not include snapshots with time smaller than"min_time"
(default:0.0
)"float_type": option
— number of bits per float number (options:32
/64
, default:32
)
{
"labels": ["ALD", "TRC"],
"sizes": [2, 1],
"box_size": 250.0,
"input_xyz_template": "enzymes_double_100_tracers_492_",
"input_xyz_range": [1, 11],
"min_time": 0.0,
"number_of_bins": 100,
"bin_range": [0, 30]
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the Lengths.py
program using following command:
python Lengths.py input.json
Successful computations should produce:
(TEMPLATE)len.txt
data file with bond lengths histogram,
Required keywords:
"box_size": float
— size of simulation (cubic) box (Å),"tracer_radii": [float, ...]
— radii of tracers randomly inserted into the box: if list contains one value, spherical particle is being inserted; else, linear particle composed of beads of given radii is being inserted (Å),"number_of_trials": integer
— number of Monte Carlo insertions per snapshot,"input_str_filename": string
— input str file, from which crowder sizes are loaded,"radii_mode": option
— bead radius definition (options:"hydrodynamic"
/"lennard-jones"
)"times": [float, ...]
— times for which configurations are loaded from.xyz
files,"input_xyz_template": string
— template of input xyz filenames,"input_xyz_range": [integer, integer]
— the number range defining input xyz filenames.
pyBrown expects input xyz
files to follow a specific naming scheme:
..., (TEMPLATE)(NUMBER).xyz
, (TEMPLATE)(NUMBER).xyz
, ...
(where TEMPLATE is a string variable defined with the keyword "input_xyz_template"
and NUMBER is an integer from range defined with the keyword "input_xyz_range"
)
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
)"verbose": boolean
— print extra information (default:false
)"bond_lengths": option
— way of defining separations between beads in case of nonspherical tracer (default (for now only option):"hydrodynamic_radii"
)"withdraw": [string, ...]
— list of labels representing particles that are randomly withdrawn before every insertion (default:[]
),"scan_mode": boolean
— iffalse
: excluded volume is computed for tracer defined by"tracer_radii"
; iftrue
: excluded volume is computed for tracers of size from0.0
to"tracer_radii"
(default:false
)"scan_density": integer
— number of tracer radii scanned in"scan_mode"
(default:2
)"float_type": option
— number of bits per float number (options:32
/64
, default:32
)
{
"box_size": 750.0,
"tracer_radii": [0.0],
"number_of_trials": 1000,
"input_xyz_template": "ficoll_42_",
"input_xyz_range": [1, 4],
"input_str_filename": "ficoll_42_1.str",
"radii_mode": "hydrodynamic",
"times": [0.0, 1000000.0, 2000000.0, 3000000.0, 4000000.0, 4500000.0],
"withdraw": ["FIC", "FIC"]
}
{
"box_size": 750.0,
"tracer_radii": [51],
"number_of_trials": 1000,
"input_xyz_template": "ficoll_42_",
"input_xyz_range": [1, 4],
"input_str_filename": "ficoll_42_1.str",
"radii_mode": "hydrodynamic",
"times": [0.0, 1000000.0, 2000000.0, 3000000.0, 4000000.0, 4500000.0],
"withdraw": [],
"scan_mode": true,
"scan_density": 3
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the ExVol.py
program using following command:
python ExVol.py input.json
Successful computations should produce:
*fex.txt
data file with excluded volume fractions as a function of tracer radii,
Required keywords:
"box_size": float
— size of simulation (cubic) box (Å),"max_tracer_radius": float
— (Å),"dr_tracer": float
— tracer size increment (Å),"input_xyz_template": string
— template of input xyz filenames,"input_xyz_range": [integer, integer]
— the number range defining input xyz filenames,"input_str_filename": string
— input str filename,"times": [float, ...]
— times for which configurations are loaded from.xyz
files (ps),"radii_mode": option
— bead radius definition (options:"hydrodynamic"
/"lennard-jones"
),"number_of_bins": integer
— number of histogram bins.
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
),"verbose": boolean
— print extra information (default:false
),"float_type": option
— number of bits per float number (options:32
/64
, default:32
),"omp_cores": integer
— number of CPU units (default:0
meaning autopick viamultiprocessing.cpu_count()
).
{
"box_size": 750.0,
"input_xyz_template": "cytoplasm_250_",
"input_xyz_range": [1,2],
"times": [1000000.0],
"input_str_filename": "cytoplasm_250_1.str",
"radii_mode": "lennard-jones",
"max_tracer_radius": 200.0,
"dr_tracer": 1.0,
"number_of_trials": 100,
"number_of_bins": 40,
"verbose": true,
"omp_cores": 4
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the Pores.py
program using following command:
python Pores.py input.json
Successful computations should produce:
*psd.txt
data file with pore size distribution,*psd.pdf
image file with pore size distribution
Required keywords:
"box_size": float
— size of simulation (cubic) box (Å),"input_xyz_filename": string
— input xyz filename,"input_str_filename": string
— input str filename,"snapshot_time": float
— time defining single snapshot from.xyz
file (ps),"grid_density": integer
— number of voxels per box side,"radii_mode": option
— bead radius definition (options:"hydrodynamic"
/"lennard-jones"
)
Optional keywords:
"debug": boolean
— print extra information useful for debugging purposes (default:false
),"verbose": boolean
— print extra information (default:false
),"float_type": option
— number of bits per float number (options:32
/64
, default:32
),"omp_cores": integer
— number of CPU units (default:0
meaning autopick viamultiprocessing.cpu_count()
).
{
"box_size": 750.0,
"input_xyz_filename": "cytoplasm_250_1.xyz",
"input_str_filename": "cytoplasm_250_1.str",
"verbose": true,
"debug": true,
"grid_density": 10,
"snapshot_time": 1629699.184723,
"radii_mode": "lennard-jones"
}
If you have already prepared an input JSON file (using keywords introduced above), you can run the Voxels.py
program using following command:
python Voxels.py input.json
Successful computations should produce:
*voxels.txt
data file with digitized snapshot,
If you have already voxelized snapshot you should have *voxels.txt
file. You can run the PlotVoxels.py
program using following command:
python PlotVoxels.py *voxels.txt