2 # This script takes a .vol file that has neighbor information created with
3 # the custom output string "%i %q %v %n", and creates a map of the network, by
4 # drawing a line between all particles which are neighbors
6 open A
,"@ARGV[0].vol" or die "Can't open input file";
7 open B
,">@ARGV[0].net" or die "Can't open output file";
17 $l[$n][$_-4]=@A[$_] foreach 4..$#A;
21 foreach $n (1..$maxn) {
24 print B
"$x[$j] $y[$j]\n$x[$n] $y[$n]\n\n\n" if $j>=$n;