-
Notifications
You must be signed in to change notification settings - Fork 1
/
ott-sasa.txt
30 lines (30 loc) · 1.21 KB
/
ott-sasa.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
############################
# This tcl script uses sasa command to estimate surface area of whole oil droplet, and the contact areas of oil-water and oil-surface.
# command [measure sasa]
# 'measure sasa 1.4 $A -restrict $B' means sasa only calculates the restrict region $B of selected entity $A
# with a probing radius of 1.4 angstrom (water)
#
# polar oil: OTT
# surface: KER
# water: SOL
# created by Zelong Zhang in 2020
# https://er1czz.github.io/vmd/
############################
set output [open "sasa_out.txt" w]
set frames [molinfo top get numframes]
# loop
for {set i 0} {$i < $frames} {incr i} {
set oil [atomselect top "resname OTT" frame $i]
set ok [atomselect top "resname OTT KER" frame $i]
set ow [atomselect top "resname OTT SOL" frame $i]
set sasa_total [measure sasa 1.4 $oil]
set sasa_dome [measure sasa 1.4 $ok -restrict $oil ]
set sasa_bottom [measure sasa 1.4 $ow -restrict $oil ]
puts $output "$i $sasa_total $sasa_dome $sasa_bottom"
puts "Frame: $i $sasa_total $sasa_dome $sasa_bottom"
}
puts "Bingo!"
puts "Your data have been saved to the output file: sasa_out.txt"
puts "data format as:"
puts "Frame id, oil total, oil-water, oil-surface (unit: angstrom^2)"
close $output