Writing TCL scripts for VMD¶
This module defines TCL file for VMD program. Questions/Problems: karolami@pitt.edu
-
writeVMDstiffness
(stiffness, pdb, indices, k_range, filename='vmd_out', select='protein and name CA', loadToVMD=False)[source]¶ Returns three files starting with the provided filename and having their own extensions:
- A PDB file that can be used in the TCL script.
(2) TCL file containing vmd commands for loading PDB file with accurate vmd representation. Pair of residues with selected k_range of effective spring constant are shown in VMD respresentation with solid line between them. If more than one residue is selected in indices, different pair for each residue will be colored in the different colors.
(3) TXT file containing pair of residues with effective spring constant in selected range k_range.
Note
- This function skips modes with zero eigenvalues.
- If a
Vector
instance is given, it will be normalized before it is written. It’s length before normalization will be written as the scaling factor of the vector.
Parameters: - stiffness (
ndarray
) – mechanical stiffness profile calculated withcalcMechStiff()
- pdb (
ndarray
,Atomic
) – a coordinate set or an object withgetCoords
method - indices (list) – an amino acid number or a pair of amino acid numbers
- k_range (int, float, list) – effective force constant value or range of values
- select (
Select
, str) – a selection or selection string default is ‘protein and name CA’ - loadToVMD (bool) – whether to load VMD and run the tcl file default is False
-
writeDeformProfile
(stiffness, pdb, filename='dp_out', select='protein and name CA', pdb_selstr='protein', loadToVMD=False)[source]¶ Calculate deformability (plasticity) profile of molecule based on mechanical stiffness matrix (see [EB08]).
Parameters: - stiffness (:class:`~numpy.ndarray) – mechanical stiffness matrix
- pdb (
ndarray
) – a coordinate set or an object withgetCoords
method
Note: selection can be done using
select
andpdb_selstr
.select
definesmodel
selection (used for buildingANM
model) andpdb_selstr
will be used in VMD program for visualization.By default files are saved as filename and loaded to VMD program. To change it use
loadToVMD=False
.Mean value of mechanical stiffness for molecule can be found in occupancy column in PDB file.
-
calcChainsNormDistFluct
(coords, ch1, ch2, cutoff=10.0, percent=5, rangeAng=5, filename='ch_ndf_out', loadToVMD=False)[source]¶ Calculate protein-protein interaction using getNormDistFluct() from
GNM
model. It is assigned to protein complex.Parameters: - coords (
ndarray
.) – a coordinate set or an object withgetCoords
method. - ch1 ('A' or other letter as a string) – first chain name
- ch2 (string) – second chain name
- cutoff (float) – cutoff distance (Å) for pairwise interactions in Kirchhoff matrix, default is 10.0 Å
- percent (int or float) – percent of the highest and lowest results displayed in _VMD program, default is 5%
- rangeAng (int or float) – cutoff range of protein-protein interactions, default is 5 Å
- filename (str) – name of tcl file from _VMD program
By default files are saved as filename and loaded to VMD program. To change it use
loadToVMD=False
.UNDER PREPARATION.. problems with not complete structures
- coords (