Mercurial > repos > deepakjadmin > r_caret_test1
comparison mayachemtool/mayachemtools/docs/modules/txt/PDBFileUtil.txt @ 0:a4a2ad5a214e draft default tip
Uploaded
| author | deepakjadmin |
|---|---|
| date | Thu, 05 Nov 2015 02:37:56 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a4a2ad5a214e |
|---|---|
| 1 NAME | |
| 2 PDBFileUtil | |
| 3 | |
| 4 SYNOPSIS | |
| 5 use PDBFileUtil ; | |
| 6 | |
| 7 use PDBFileUtil qw(:all); | |
| 8 | |
| 9 DESCRIPTION | |
| 10 PDBFileUtil module provides the following functions: | |
| 11 | |
| 12 GenerateAtomOrHetatmRecordLine, GenerateAtomRecordLine, | |
| 13 GenerateConectRecordLine, GenerateEndRecordLine, | |
| 14 GenerateHeaderRecordLine, GenerateHeaderRecordTimeStamp, | |
| 15 GenerateHetatmRecordLine, GenerateTerRecordLine, GetAllResidues, | |
| 16 GetChainsAndResidues, GetConectRecordLines, GetExperimentalTechnique, | |
| 17 GetExperimentalTechniqueResolution, GetMinMaxCoords, GetPDBRecordType, | |
| 18 GetRecordTypesCount, IsAtomRecordType, IsConectRecordType, | |
| 19 IsEndmdlRecordType, IsHeaderRecordType, IsHetatmRecordType, | |
| 20 IsMasterRecordType, IsModelRecordType, IsPDBFile, IsSeqresRecordType, | |
| 21 IsTerRecordType, ParseAtomOrHetatmRecordLine, ParseAtomRecordLine, | |
| 22 ParseConectRecordLine, ParseExpdtaRecordLine, ParseHeaderRecordLine, | |
| 23 ParseHetatmRecordLine, ParseMasterRecordLine, | |
| 24 ParseRemark2ResolutionRecordLine, ParseSeqresRecordLine, | |
| 25 ParseTerRecordLine, ReadPDBFile | |
| 26 | |
| 27 METHODS | |
| 28 GenerateAtomOrHetatmRecordLine | |
| 29 $RecordLine = GenerateAtomOrHetatmRecordLine($RecordType, | |
| 30 $AtomNumber, $AtomName, $AlternateLocation, $ResidueName, | |
| 31 $ChainID, $ResidueNumber, $InsertionCode, $X, $Y, $Z, | |
| 32 $Occupancy, $TemperatureFactor, $SegmentID, | |
| 33 $ElementSymbol, $AtomCharge); | |
| 34 | |
| 35 Returns ATOM or HETATM record line. | |
| 36 | |
| 37 GenerateAtomRecordLine | |
| 38 $RecordLine = GenerateAtomRecordLine($AtomNumber, | |
| 39 $AtomName, $AlternateLocation, $ResidueName, $ChainID, | |
| 40 $ResidueNumber, $InsertionCode, $X, $Y, $Z, $Occupancy, | |
| 41 $TemperatureFactor, $SegmentID, $ElementSymbol, $AtomCharge); | |
| 42 | |
| 43 Returns ATOM record line. | |
| 44 | |
| 45 GenerateConectRecordLine | |
| 46 $RecordLine = GenerateConectRecordLine($AtomNum, $BondedAtomNum1, | |
| 47 $BondedAtomNum2, $BondedAtomNum3, $BondedAtomNum4, | |
| 48 $HBondedAtomNum1, $HBondedAtomNum2, $SaltBridgedAtomNum1, | |
| 49 $HBondedAtomNum3, $HBondedAtomNum4, $SaltBridgedAtomNum2); | |
| 50 | |
| 51 Returns CONECT record line. | |
| 52 | |
| 53 GenerateHeaderRecordLine | |
| 54 $RecordLine = GenerateHeaderRecordLine($IDCode, [$Classification, | |
| 55 $Date]); | |
| 56 | |
| 57 Returns HEADER record line. | |
| 58 | |
| 59 GenerateHeaderRecordTimeStamp | |
| 60 $Date = GenerateHeaderRecordTimeStamp(); | |
| 61 | |
| 62 Returns PDB header time stamp. | |
| 63 | |
| 64 GenerateHetatmRecordLine | |
| 65 $RecordLine = GenerateHetatmRecordLine($AtomNumber, $AtomName, | |
| 66 $AlternateLocation, $ResidueName, $ChainID, $ResidueNumber, | |
| 67 $InsertionCode, $X, $Y, $Z, $Occupancy, $TemperatureFactor, | |
| 68 $SegmentID, $ElementSymbol, $AtomCharge); | |
| 69 | |
| 70 Returns HETATM record line. | |
| 71 | |
| 72 GenerateEndRecordLine | |
| 73 $RecordLine = GenerateEndRecordLine(); | |
| 74 | |
| 75 Returns END record line. | |
| 76 | |
| 77 GenerateTerRecordLine | |
| 78 $RecordLine = GenerateTerRecordLine($SerialNumber, [$ResidueName, | |
| 79 $ChainID, $ResidueNumber, $InsertionCode]); | |
| 80 | |
| 81 Returns TER record line. | |
| 82 | |
| 83 GetAllResidues | |
| 84 $ResiduesDataRef = GetAllResidues($PDBRecordLinesRef); | |
| 85 | |
| 86 Gets residue information using ATOM/HETATM records and returns a | |
| 87 reference to a hash with following key/value pairs: | |
| 88 | |
| 89 $ResiduesDataRef->{ResidueNames} - Array of all the residues | |
| 90 $ResiduesDataRef->{ResidueCount}{$ResidueName} - Count of residues | |
| 91 $ResiduesDataRef->{AtomResidueNames}} - Array of all ATOM residues | |
| 92 $ResiduesDataRef->{AtomResidueCount}{$ResidueName} - Count of | |
| 93 residues in ATOM records | |
| 94 $ResiduesDataRef->{HetatomResidueNames} - List of all HETATM | |
| 95 residues | |
| 96 $ResiduesDataRef->{HetatmResidueCount}{$ResidueName} - Count of | |
| 97 residues HETATM records | |
| 98 | |
| 99 ATOM/HETATM records after the first ENDMDL records are simply | |
| 100 ingnored. | |
| 101 | |
| 102 GetChainsAndResidues | |
| 103 $ChainsDataRef = GetChainsAndResidues($PDBRecordLinesRef, | |
| 104 [$RecordsSource, $GetChainResiduesBeyondTERFlag, | |
| 105 $GetRecordLinesFlag]); | |
| 106 | |
| 107 Gets chains and residue information using ATOM/HETATM or SEQRES | |
| 108 records and returns a reference to a hash with these keys: | |
| 109 | |
| 110 $ChainsDataRef->{ChainIDs} - List of chain IDs with 'None' for | |
| 111 no IDs | |
| 112 $ChainsDataRef->{Residues}{$ChainID} - List of residues in order | |
| 113 of their appearance in a chain | |
| 114 $ChainsDataRef->{ResidueCount}{$ChainID}{$ResidueName} - Count of | |
| 115 residues in a chain | |
| 116 | |
| 117 Chains and residue data can be extacted using either ATOM/HETATM | |
| 118 records or SEQRES records. ATOM/HETATM records after the first | |
| 119 ENDMDL records are simply ingnored. | |
| 120 | |
| 121 GetConectRecordLines | |
| 122 $ConectRecordLinesRef = GetConectRecordLines($PDBRecordLinesRef, | |
| 123 $AtomNumbersMapRef); | |
| 124 | |
| 125 Collects CONECT record lines for specific atom number, modified | |
| 126 specified data to exclude any atom number not present in the list of | |
| 127 specified atom numbers and returns a reference to list of CONECT | |
| 128 record lines. | |
| 129 | |
| 130 GetExperimentalTechnique | |
| 131 $ExperimentalTechnique = GetExperimentalTechnique($PDBRecordLinesRef); | |
| 132 | |
| 133 Returns *ExperimentalTechnique* value retrieved from EXPDATA record | |
| 134 line. | |
| 135 | |
| 136 GetExperimentalTechniqueResolution | |
| 137 ($Resolution, $ResolutionUnits) = GetExperimentalTechniqueResolution( | |
| 138 $PDBRecordLinesRef); | |
| 139 | |
| 140 Returns *Resolution* and *ResolutionUnits* values from REMARK 2 | |
| 141 RESOLUTION record line. | |
| 142 | |
| 143 GetMinMaxCoords | |
| 144 ($XMin, $YMin, $ZMin, $XMax, $YMax, $ZMax) = | |
| 145 GetMinMaxCoords($PDBRecordLinesRef); | |
| 146 | |
| 147 Returns minimum and maximum XYZ coordinates for ATOM/HETATM records. | |
| 148 | |
| 149 GetPDBRecordType | |
| 150 $RecordType = GetPDBRecordType($RecordLine); | |
| 151 | |
| 152 Returns type of *RecordLine*. | |
| 153 | |
| 154 GetRecordTypesCount | |
| 155 $RecordTypeDataRef = GetRecordTypesCount($PDBRecordLinesRef, | |
| 156 [$SpecifiedRecordType, $GetRecordLinesFlag]); | |
| 157 | |
| 158 Counts the number of each record type or a $SpecifiedRecordType and | |
| 159 returns a reference to data type with following key/value pairs: | |
| 160 | |
| 161 $RecordTypeDataRef->{RecordTypes} - An array of unique record types | |
| 162 in order of their presence in the file | |
| 163 $RecordTypeDataRef->{Count}{$RecordType} - Count of each record type | |
| 164 $RecordTypeDataRef->{Lines}{$RecordType} - Optional lines data for a | |
| 165 specific record type. | |
| 166 | |
| 167 IsAtomRecordType | |
| 168 $Status = IsAtomRecordType($RecordLine); | |
| 169 | |
| 170 Returns 1 or 0 based on whether it's a ATOM record line. | |
| 171 | |
| 172 IsConectRecordType | |
| 173 $Status = IsAtomConectType($RecordLine); | |
| 174 | |
| 175 Returns 1 or 0 based on whether it's a CONECT record line. | |
| 176 | |
| 177 IsEndmdlRecordType | |
| 178 $Status = IsEndmdlRecordType($RecordLine); | |
| 179 | |
| 180 Returns 1 or 0 based on whether it's a ENDMDL a record line. | |
| 181 | |
| 182 IsHeaderRecordType | |
| 183 $Status = IsHeaderRecordType($RecordLine); | |
| 184 | |
| 185 Returns 1 or 0 based on whether it's a HEADER a record line. | |
| 186 | |
| 187 IsHetatmRecordType | |
| 188 $Status = IsHetatmRecordType($RecordLine); | |
| 189 | |
| 190 Returns 1 or 0 based on whether it's a HETATM a record line. | |
| 191 | |
| 192 IsMasterRecordType | |
| 193 $Status = IsMasterRecordType($RecordLine); | |
| 194 | |
| 195 Returns 1 or 0 based on whether it's a MASTER a record line. | |
| 196 | |
| 197 IsModelRecordType | |
| 198 $Status = IsModelRecordType($RecordLine); | |
| 199 | |
| 200 Returns 1 or 0 based on whether it's a MODEL record line. | |
| 201 | |
| 202 IsPDBFile | |
| 203 $Status = IsPDBFile($PDBFile); | |
| 204 | |
| 205 Returns 1 or 0 based on whether it's a PDB file. | |
| 206 | |
| 207 IsSeqresRecordType | |
| 208 $Status = IsSeqresRecordType($RecordLine); | |
| 209 | |
| 210 Returns 1 or 0 based on whether it's SEQRES a record line. | |
| 211 | |
| 212 IsTerRecordType | |
| 213 $Status = IsTerRecordType($RecordLine); | |
| 214 | |
| 215 Returns 1 or 0 based on whether it's a TER record line. | |
| 216 | |
| 217 ParseAtomOrHetatmRecordLine | |
| 218 ($AtomNumber, $AtomName, $AlternateLocation, $ResidueName, $ChainID, | |
| 219 $ResidueNumber, $InsertionCode, $X, $Y, $Z, $Occupancy, | |
| 220 $TemperatureFactor, $SegmentID, $ElementSymbol, $AtomCharge) = | |
| 221 ParseAtomOrHetatmRecordLine($RecordLine); | |
| 222 | |
| 223 Parses ATOM or HETATM record line. | |
| 224 | |
| 225 ParseAtomRecordLine | |
| 226 ($AtomNumber, $AtomName, $AlternateLocation, $ResidueName, $ChainID, | |
| 227 $ResidueNumber, $InsertionCode, $X, $Y, $Z, $Occupancy, | |
| 228 $TemperatureFactor, $SegmentID, $ElementSymbol, $AtomCharge) = | |
| 229 ParseAtomRecordLine($RecordLine); | |
| 230 | |
| 231 Parses ATOM record line. | |
| 232 | |
| 233 ParseConectRecordLine | |
| 234 ($AtomNum, $BondedAtomNum1, $BondedAtomNum2, $BondedAtomNum3, | |
| 235 $BondedAtomNum4, $HBondedAtomNum1, $HBondedAtomNum2, | |
| 236 $SaltBridgedAtomNum1, $HBondedAtomNum3, $HBondedAtomNum4, | |
| 237 $SaltBridgedAtomNum2) = ParseConectRecordLine($RecordLine); | |
| 238 | |
| 239 Parses CONECT record line. | |
| 240 | |
| 241 ParseExpdtaRecordLine | |
| 242 ($ContinuationNum, $ExperimentalTechnique) = ParseExpdtaRecordLine($Line); | |
| 243 | |
| 244 Parses EXPDTA record line. | |
| 245 | |
| 246 ParseHeaderRecordLine | |
| 247 ($Classification, $DepositionDate, $IDCode) = ParseHeaderRecordLine($RecordLine); | |
| 248 | |
| 249 Parses HEADER record line | |
| 250 | |
| 251 ParseHetatmRecordLine | |
| 252 ($AtomNumber, $AtomName, $AlternateLocation, $ResidueName, $ChainID, | |
| 253 $ResidueNumber, $InsertionCode, $X, $Y, $Z, $Occupancy, | |
| 254 $TemperatureFactor, $SegmentID, $ElementSymbol, $AtomCharge) = | |
| 255 ParseHetatmRecordLine($RecordLine); | |
| 256 | |
| 257 Parses HETATM record line. | |
| 258 | |
| 259 ParseMasterRecordLine | |
| 260 ($NumOfRemarkRecords, $NumOfHetRecords, $NumOfHelixRecords, | |
| 261 $NumOfSheetRecords, $NumOfTurnRecords, $NumOfSiteRecords, | |
| 262 $NumOfTransformationsRecords, $NumOfAtomAndHetatmRecords, | |
| 263 $NumOfTerRecords, $NumOfConectRecords, $NumOfSeqresRecords) = | |
| 264 ParseMasterRecordLine($RecordLine); | |
| 265 | |
| 266 Parses MASTER ecord line. | |
| 267 | |
| 268 ParseRemark2ResolutionRecordLine | |
| 269 ($Resolution, $ResolutionUnits) = ParseRemark2ResolutionRecordLine( | |
| 270 $RecordLine); | |
| 271 | |
| 272 Parses REMARK 2 RESOLUTION record line. | |
| 273 | |
| 274 ParseSeqresRecordLine | |
| 275 ($RecordSerialNumber, $ChainID, $NumOfResidues, $ResidueNames) = | |
| 276 ParseSeqresRecordLine($RecordLine); | |
| 277 | |
| 278 Parses SEQRES record line. | |
| 279 | |
| 280 ParseTerRecordLine | |
| 281 ($SerialNumber, $ResidueName, $ChainID, $ResidueNumber, $InsertionCode) = | |
| 282 ParseTerRecordLine($RecordLine); | |
| 283 | |
| 284 Parses TER record line. | |
| 285 | |
| 286 ReadPDBFile | |
| 287 $PDBRecordLinesRef = ReadPDBFile($PDBFile); | |
| 288 | |
| 289 Reads PDB file and returns reference to record lines. | |
| 290 | |
| 291 AUTHOR | |
| 292 Manish Sud <msud@san.rr.com> | |
| 293 | |
| 294 SEE ALSO | |
| 295 FileUtil.pm, SequenceFileUtil.pm, TextUtil.pm | |
| 296 | |
| 297 COPYRIGHT | |
| 298 Copyright (C) 2015 Manish Sud. All rights reserved. | |
| 299 | |
| 300 This file is part of MayaChemTools. | |
| 301 | |
| 302 MayaChemTools is free software; you can redistribute it and/or modify it | |
| 303 under the terms of the GNU Lesser General Public License as published by | |
| 304 the Free Software Foundation; either version 3 of the License, or (at | |
| 305 your option) any later version. | |
| 306 |
