mol new dna_base.pdb mol new 5GZB.pdb set dnaAll [atomselect 0 all] $dnaAll moveby [vecinvert [measure center $dnaAll]] set protAll [atomselect 1 all] $protAll moveby [vecinvert [measure center $protAll]] set protProt [atomselect 1 "protein"] set protDnaAtoms [ atomselect 1 "chain B and resid 4 to 10 and name P"] puts [$protDnaAtoms get resname] set dnaAtoms1 [atomselect 0 "chain A and resid 8 to 14 and name P"] set dnaAtoms2 [atomselect 0 "chain A and resid 16 to 22 and name P"] puts [$dnaAtoms1 get resname] puts [$dnaAtoms2 get resname] set protSe [atomselect 1 "name SE"] $protSe set name "SD" $protSe set element "S" set protMse [atomselect 1 "resname MSE"] $protMse set resname "MET" #Begin moving the protein. set fm [measure fit $protDnaAtoms $dnaAtoms1] $protAll move $fm $protProt set chain A $protProt writepdb prot_1.pdb set fm [measure fit $protDnaAtoms $dnaAtoms2] $protAll move $fm $protProt set chain B $protProt writepdb prot_2.pdb #set dnaAde [atomselect 0 "resname DA"] #$dnaAde set resname ADE #set dnaCyt [atomselect 0 "resname DC"] #$dnaCyt set resname CYT #set dnaGua [atomselect 0 "resname DG"] #$dnaGua set resname GUA #set dnaThy [atomselect 0 "resname DT"] #$dnaThy set resname THY set dnaA [atomselect 0 "(chain A and noh) and not (chain A and resid 1 and name P O1P O2P OXT) and not name O2'"] set dnaB [atomselect 0 "(chain B and noh) and not (chain B and resid 1 and name P O1P O2P OXT) and not name O2'"] $dnaA set chain C $dnaB set chain D $dnaA writepdb dnaC.pdb $dnaB writepdb dnaD.pdb exit