hide all select oxygen var cores = {selected} ncores = cores.size scnt = 0 for (var i = 1; i <= ncores; i = i + 1) scnt = scnt + 1 draw ID @{"nuc" + scnt} DIAMETER 80.0 @{cores[i].xyz} COLOR deepskyblue end for select elemno=20 var dna = {selected} ndna = dna.size scnt = scnt + 1 i =1 draw ID @{"dna" + scnt} DIAMETER 20.0 @{dna[i].xyz} COLOR green for (var i = 2; i <= ndna ; i = i + 1) scnt = scnt + 1 draw ID @{"dna" + scnt} DIAMETER 20.0 @{dna[i].xyz} COLOR yellow end for for (var i = 1; i <= ndna; i=i+2 ) for (var j = i + 2 ; j <= ndna; j=j+2) dis = dna[i].distance(dna[j]) if (dis < 18) { print " dna-dna " + i + " " + j + " "+ dis scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 20.0 @{dna[i].xyz} COLOR red scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 20.0 @{dna[j].xyz} COLOR red j = ndna } end for end for for (var i = 1; i <= ncores; i=i+1 ) for (var j = i + 1 ; j <= ncores; j=j+1) dis = cores[i].distance(cores[j]) if (dis < 100) { print " core-core " + i + " " + j + " "+ dis scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 80.0 @{cores[i].xyz} COLOR red scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 80.0 @{cores[j].xyz} COLOR red j = ncores } end for end for for (var i = 1; i <= ndna; i=i+2) for (var j = 1 ; j <= ncores; j=j+1) iddna = @dna[i].atomno idcore = @cores[j].atomno if((iddna > idcore - 31 ) && ( iddna < idcore)) { j = 33 + j print " skipping nuc " } else { dis = dna[i].distance(cores[j]) if (dis < 55) { print " core-dna " + i + " " + j + " "+ dis scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 20.0 @{dna[i].xyz} COLOR red scnt = scnt + 1 draw ID @{"sphere" + scnt} DIAMETER 80.0 @{cores[j].xyz} COLOR red j = ncores } } end for end for