Macro STR_CollectDataxxx. Usage:
Cauton:
Sub Str_CollectData() 'collects the sequences of the PDB structures 'the residue labels, x,y,and z coordinates on individual worksheets Sheets.Add ActiveSheet.Name = "SEQ" Sheets.Add ActiveSheet.Name = "LABEL" Sheets.Add ActiveSheet.Name = "Alig" Sheets.Add ActiveSheet.Name = "X" Sheets.Add ActiveSheet.Name = "Y" Sheets.Add ActiveSheet.Name = "Z" For i = 1 To 255 Step 1 If IsEmpty(Sheets("Files").Cells(i, 1)) Then Exit For aaa = Sheets("Files").Cells(i, 1) Sheets("Label").Cells(1, i) = aaa Sheets("SEQ").Cells(1, i) = aaa Sheets("X").Cells(1, i) = aaa Sheets("Y").Cells(1, i) = aaa Sheets("Z").Cells(1, i) = aaa Sheets(aaa).Select k = 2 For j = 1 To 10000 Step 1 'all atom records If (IsEmpty(Cells(j, 1)) And IsEmpty(Cells(j + 1, 1)) And IsEmpty(Cells(j + 2, 1))) Then Exit For 'end of table If (Cells(j, 4) Like "CA") Then 'new residue k = k + 1 Sheets("Label").Cells(k, i) = Cells(j, 9) Sheets("SEQ").Cells(k, i) = Cells(j, 6) Sheets("X").Cells(k, i) = Cells(j, 12) Sheets("Y").Cells(k, i) = Cells(j, 13) Sheets("Z").Cells(k, i) = Cells(j, 14) End If Next j xxx: Next i End Sub |
|
|||||||||||||||||
Last Modified by A.Honegger |