package require topotools mol new /Users/xadams/CESA/structures/coiled-coil_structures/1weo.pdb #mol new /Users/xadams/CESA/structures/CESA8pop_alphastalkONLY/namd/merged.psf mol new merged.psf mol addfile merged.pdb set all [atomselect 0 "all"] set ions [atomselect 0 "ion"] set arrow [atomselect 0 "alpha and resid 47 to 56"] set target [atomselect top "alpha and resid 37 to 46 and segname PROA"] set M [measure fit $arrow $target] $all move $M $all set chain A $ions writepdb ionsA.pdb set target [atomselect top "alpha and resid 37 to 46 and segname PROB"] set M [measure fit $arrow $target] $all move $M $all set chain B $ions writepdb ionsB.pdb set target [atomselect top "alpha and resid 37 to 46 and segname PROC"] set M [measure fit $arrow $target] $all move $M $all set chain C $ions writepdb ionsC.pdb set midlist {} set mol [mol new "ionsA.pdb"] lappend midlist $mol set mol [mol new "ionsB.pdb"] lappend midlist $mol set mol [mol new "ionsC.pdb"] lappend midlist $mol set mol [::TopoTools::mergemols $midlist] animate write pdb mergedions.pdb $mol