Package: calcDiameter
calcDiameter: a method to find the maximum diameter of a ring-shaped protein complex of symmetry Cn.How it worksIt reads a ‘Biological Assembly’ PDB file and finds the right orientation such that the protein ring lies ‘flat’ on XY plane. Then, the maximum distance between any pair of residues residing in the same ‘height slice’ is returned. On top of that the method returns the ‘effective radius’InstallationVia pip fromPyPi(recommended):$sudopipinstallcalcDiameterIf your system lacks pip,install it first.Python versionThe tool was developed using Python 3.7, however running under
Python 3.xshouldwork as well.UsagePython 3.7 shell>>>fromcalcDiameterimport*>>>calcDiameter('1qaw.pdb')ReadingPDBfileObtainingapproximateorientationbytestingrotationsaboutXandYaxesevery10degrees...ObtainingaccurateorientationbytestingrotationsaboutXandYaxesevery1degree...PlottingprojectonofCAatomcoordinatesontotheXYplaneMaxdiameterbetweenE:75&K:17is79.701881;effectiveradiusis39.898543(79.70188096903092,'E:75','K:17',39.89854271684067)You can set the tolerated height difference between points using the bin_ parameter; by default=3 Angstrom, change to 30 (the Z component of the distance is disregarded regardless of the bin_ parameter!). Note that the effective radius has not changed:>>>calcDiameter.calcDiameter('1qaw.pdb',bin_=30)ReadingPDBfileObtainingapproximateorientationbytestingrotationsaboutXandYaxesevery10degrees...ObtainingaccurateorientationbytestingrotationsaboutXandYaxesevery1degree...PlottingprojectonofCAatomcoordinatesontotheXYplaneMaxdiameterbetweenE:75&K:18is79.706971;effectiveradiusis39.898543(79.70697056799868,'E:75','K:18',39.89854271684067)The full list of options is as follows>>>calcDiameter(pdb,plot=True,plot3d=False,no_rotation=False,bin_=3,test=5)You can set ‘no_rotation’ to True if you believe that the pdb is already correctly oriented - the structure is already flat on the XY plane.You can also set plot3d to True if you want to see the 3d plots of points making up the structure. First you will see the original orientation of the pdb - feel free to look at it from all angles, then close it to see the best orientation that the program has found - the structure should lie flat on the XY plane; close the plot to obtain the max diameter along the XY plane.The test parameter specifies the radius of the structure (from its centre) that is expected to stay hollow provided we have found the right orientation for the structure.Then you can query PDB to retrieve all structures of rotational symmetry Cn (specify n); returns a pandas data-frame with parameters calculated for the structures:>>>getDiametersCn(13)RetrievinglistofPDBsthatmatchtheselectedcriteria...2JES,2X2V,3JVO,4CBJ,4CBK,4V2T,4XJN,6GY6DownloadingPDB2JESReading2JESPDBfileObtainingapproximateorientationbytestingrotationsaboutXandYaxesevery10degrees...(...)Diameterlabel1label2Eff.radusCn2JES162.626456G:30U:2981.913051132X2V60.312264G:40M:4030.425173133JVO110.369143C:1I:5055.239389134CBJ60.344003F:40M:4030.422166134CBK60.169909E:40L:4030.276677134V2T220.978870C:82X:82111.307835134XJN193.364481B:110M:11097.363493136GY6249.636369I:151S:151125.73087713The full list of options is as follows: res_min & res_max are the minimum and maximum structure resolution thresholds - defaults 0.0 and 3.0, respectively:>>>getDiametersCn(n,res_min=0.0,res_max=3.0,plot=True,bin_=3,test=5)LicenceMITAuthorsJan Zaucha