#! /usr/bin/pwsh ##################################### # Script for running HullRad on a collection of PDB files on Windows # Thanks to Lucas Shen for coding, 2022 # # Edit the basename of the PDB files below, i.e. "1qd5*.pdb" to your basename ##################################### $list1 = ls 1qd5*.pdb New-item -Path . -Name "filenames.txt" -ItemType "file" -Force New-item -Path . -Name "Rg.dat" -ItemType "file" -Force New-item -Path . -Name "Dmax.dat" -ItemType "file" -Force New-item -Path . -Name "Asphericity.dat" -ItemType "file" -Force New-item -Path . -Name "s.dat" -ItemType "file" -Force for ($i=0; $i -lt $list1.Length; $i++){ Add-Content filenames.txt $list1[$i] } $list = Get-Content filenames.txt for ($i=0; $i -lt $list.Length; $i++){ $strs = $list[$i] -split "\",0,"SimpleMatch","IgnoreCase" $filename = $strs[-1] $filename python HullRadV8.1.py $filename | Out-File -Path HRout.txt $temp = (Get-Content HRout.txt | Select -First 11 | Select -Last 1).split() | where {$_} Add-Content Rg.dat $temp[2] $temp = (Get-Content HRout.txt | Select -First 12 | Select -Last 1).split() | where {$_} Add-Content Dmax.dat $temp[2] $temp = (Get-Content HRout.txt | Select -First 21 | Select -Last 1).split() | where {$_} Add-Content Asphericity.dat $temp[2] $temp = (Get-Content HRout.txt | Select -First 17 | Select -Last 1).split() | where {$_} Add-Content s.dat $temp[2] }