Skip to content

Commit

Permalink
switched to pbwithin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Sandberg committed Nov 14, 2024
1 parent 9ab5120 commit ed87df6
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions TCL/polarDensity_for_DTA.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -282,23 +282,13 @@ proc leaflet_sorter_2 {atsel_in refsel_in frame_i} {
;# Compares lipid's COM z component to local midplane and sorts accordingly.
proc leaflet_sorter_3 {atsel_in frame_i} {
set lipidsel [atomselect top $atsel_in frame $frame_i]
puts [$lipidsel num]
set lipid_com [measure center $lipidsel weight mass]
set lipid_x [lindex $lipid_com 0]
set lipid_y [lindex $lipid_com 1]
set lipid_z [lindex $lipid_com 2]

set local_surfaces [atomselect top "name PO4 GL1 GL2 AM1 AM2 and (x-$lipid_x)*(x-$lipid_x)+(y-$lipid_y)*(y-$lipid_y)<200" frame $frame_i]

if { [catch {set local_midplane [lindex [measure center $local_surfaces weight mass] 2]} errid] } {
puts stderr "$errid"
$lipidsel set user2 3
$lipidsel delete
$local_surfaces delete
return 3
} else {
set local_midplane [lindex [measure center $local_surfaces weight mass] 2]
}
set local_surfaces [atomselect top "name PO4 GL1 GL2 AM1 AM2 and pbwithin 200 of $atsel_in" frame $frame_i]
set local_midplane [lindex [measure center $local_surfaces weight mass] 2]
$local_surfaces delete

if {$lipid_z < $local_midplane} {
Expand Down

0 comments on commit ed87df6

Please sign in to comment.