Hey all for a program I am working on it uses pdb (protein data bank) files and computes the distance between all atoms from one another. I have a code that does this, however my personal and work computers don't have enough computing power to fully execute the program without crashing the program I run it in (VMD- Visual Molecular Dynamics). I do however have access to a supercomputer, but it only runs perl scripts. The code is written for the VMD extension TK console. Is there a way that I can use perl to execute my tk console code? below is the code:
set seg1 [atomselect top "segname LA0 and name CA"]
set seg2 [atomselect top "segname RA0 and name CA"]
set file [open "Contact_map27.dat" w]
set list1 [$seg1 get index]
set list2 [$seg2 get index]
foreach atom1 $list1 {
foreach atom2 $list2 {
set index1 [atomselect top "index $atom1"]
set index2 [atomselect top "index $atom2"]
set resid1 [[atomselect top "index $atom1"] get resid]
set resid2 [[atomselect top "index $atom2"] get resid]
set resnm1 [[atomselect top "index $atom1"] get resname]
set resnm2 [[atomselect top "index $atom2"] get resname]
puts $file "$resnm1 $resid1 $resnm2 $resid2 [veclength [vecsub [measure center $index1] [measure center $index2]]]"
$index1 delete
$index2 delete
}
}
close $file
This does the computation on the pdb file that is loaded into VMD. Any help or suggestions would be much appreciated.