20.07.2013 Views

Raport de cercetare - Lorentz JÄNTSCHI

Raport de cercetare - Lorentz JÄNTSCHI

Raport de cercetare - Lorentz JÄNTSCHI

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

function create_in<strong>de</strong>x(){<br />

for($i=0;$in;$i++){<br />

$this->in<strong>de</strong>x[$i]=$this->atom[$i][0];<br />

}<br />

}<br />

function create_topology(){<br />

$this->m=0;<br />

for($i=0;$in;$i++){<br />

//$this->in<strong>de</strong>x[$i]=$this->atom[$i][0];<br />

$label[$this->atom[$i][0]]=$i;<br />

$this->topology["count"][$i]=$this->atom[$i][6];<br />

$this->m+=$this->topology["count"][$i];<br />

}<br />

$this->m/=2;<br />

for($i=0;$in;$i++){<br />

for($j=0;$jtopology["count"][$i];$j++){<br />

$this->topology["edges"][$i][$j]=$label[$this->atom[$i][7+2*$j]];<br />

}<br />

}<br />

}<br />

function create_chemistry(&$a){<br />

for($i=0;$in;$i++){<br />

$this->chemstry[$i]=strtoupper($this->atom[$i][1]);<br />

$this->property["mass"][$i]=$a->mass[$this->chemstry[$i]];//M<br />

$this->property["elng"][$i]=$a->elng[$this->chemstry[$i]];//E<br />

$this->property["melt"][$i]=$a->melt[$this->chemstry[$i]];//L<br />

$this->property["elaf"][$i]=$a->elaf[$this->chemstry[$i]];//A<br />

$this->property["char"][$i]=$this->atom[$i][5];//Q<br />

$this->property["prot"][$i]=$this->proton[$i];//H<br />

$this->property["card"][$i]=1;//1<br />

$this->geometry["x"][$i]=$this->atom[$i][2];<br />

$this->geometry["y"][$i]=$this->atom[$i][3];<br />

$this->geometry["z"][$i]=$this->atom[$i][4];<br />

}<br />

unset($this->in<strong>de</strong>x);<br />

unset($this->proton);<br />

unset($this->chemstry);<br />

unset($this->atom);<br />

}<br />

function tmp_edve_cut($v){<br />

for($i=0;$itopology["count"][$v];$i++){<br />

for($j=0;$jtopology["count"][$this->tmp_edge[$v][$i]];$j++){<br />

if($this->tmp_edge[$this->tmp_edge[$v][$i]][$j]==$v){<br />

unset($this->tmp_edge[$this->tmp_edge[$v][$i]][$j]);<br />

break;<br />

}<br />

}<br />

}<br />

unset($this->tmp_edge[$v]);<br />

}<br />

function tmp_vert_cut($v){<br />

unset($this->tmp_edge[$v]);<br />

}<br />

function tmp_edge_cut($v1,$v2){<br />

for($j=0;$jtopology["count"][$v1];$j++){<br />

if($this->tmp_edge[$v1][$j]==$v2){<br />

unset($this->tmp_edge[$v1][$j]);<br />

$this->tmp_edge[$v1]=array_values($this->tmp_edge[$v1]);<br />

break;<br />

}<br />

}<br />

for($j=0;$jtopology["count"][$v2];$j++){<br />

if($this->tmp_edge[$v2][$j]==$v1){<br />

unset($this->tmp_edge[$v2][$j]);<br />

$this->tmp_edge[$v2]=array_values($this->tmp_edge[$v2]);<br />

break;<br />

}<br />

}<br />

}<br />

function create_matrix_distance(&$edges = NULL){<br />

if($edges==NULL){<br />

$edges=&$this->topology["edges"];<br />

$this->distance["t"]=array();<br />

$mat_a=&$this->distance["t"];<br />

for($i=0;$in;$i++){<br />

$this->distance["g"][$i][$i]=0;<br />

$this->distance["v"][$i][$i]=array(1,1,1);<br />

for($j=$i+1;$jn;$j++){<br />

178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!