27/8/2001

INSTRUCTION

[1] Quick Start

Please refer distcal1.f.
It reads 3 dimensional vectors from file fort.51.
Input nd dimensional notus vectors into fort.51, like

1.0 2.0 3.4
2.2 5.5 3.4
3.3 4.4 5.6
.
.
.
7.23 4.5 68.0

for nd=3 case. Number of lines is equal to notus.
notus and nd can be decided at PARAMETER statement in mds.f

2. make and execute. 

3. You get form standard output as follows.
Explanation is shown next to the arrow '<-----'

init                                 '<---- initialization
 rval is initialized using random seed  0.461899996 '<--- prepare start config'
 nbdrnk is generated and stored    '<--- prepare rank order matrix for target'

1  1217472.  0.00602266658  '<---- # of iterations, total force, increments'
 2  975141.  0.00343314232
 .
 .
 .
 .
 .
 37  950.  1.01582054E-05
 38  873.  9.40736481E-06 '<---- configuration converges'
 Confidence Level Test   '<---- statistical check of obtained config.'
 0  41556.5  137.  5277.66309  7.84807587 '<---- # of OTUS, expected D values,
 1  41529.  158.  5274.16064  7.84409189       observed D value, expected Std.
 .                                             deviation of D, normalized D diff
 .
 .
 .
 .
 59  41529.  152.  5274.16064  7.84522915
 60  41556.5  199.  5277.66309  7.83632803
 61  41529.  166.  5274.16064  7.84257507
 62  41529.  152.  5274.16064  7.84522915
 63  41556.5  127.  5277.66309  7.84997082

Here, D-value is statistical variable which verify how
rank order of distances in obtained config. fits with that of target config.
It obeys Gaussian distribution. Thus 7.8... means
deviation from expected value for random config. 
is more than seven times as large as 
standard deviation. This means, obtained config. is far from
random config.


[2] A little bit more instruction.

In the following, any variable used in Fortran source code is quoted as
'x'.

In this algorithm we employ, trial configuration consists of
'nd' dimensional vectors 'rval1' (or 'rval0') whose number is 'notus'.
The distance between 'iotus0'th vector and 'iotus1'the vector,
'dist(iotus0,iotus1)' is computed. Then move these 'notus' vectors
such that rank order of distances in targeted configuration.
Rank order of targeted configuration is stored in 
'nbdrnk(0:1,0:notus1,0:notus1)', where 'notus1' = 'notus' -1.
If there is not any tie data, 'nbdrnk(0,iotus0,iotus1)' and
'nbdrnk(1,iotus0,iotus1)' has same value and it represents 
distance between 'iotus0'th object and 'iouts0'th object is
'nbdrnk(0:1,iotus0,iotus1)'th smallest among distances.
If there is tie data, 
'nbdrnk(0,iotus0,iotus1)' represents 
"lower bound"  of distance between 'iotus0'th object and 'iouts0'th 
object and 'nbdrnk(1,iotus0,iotus1)' does "upper bound".
For example, there are 3 objects considered and numbered as
0,1,2. (0,1) is distance between 0th object and 1th object. Then
rank order of distances is, say,

(0,1) < (0,2) = (1,2)

then

'nbdrnk(0,0,2)' = 2  and 'nbdrnk(0,0,2)' = 3.

Then discrepancy between obtained config. and targeted config.
is evaluated as follows. Say, distance between 'iouts0'th object and
'iotus0'th object in trial configuration is nth smallest.
If n < 'nbdrnk(0,iotus0,iotus1)', then 'iotus0'th object and
'iotus1'th object should go far away from each other,
such that rank order of distances in trial config. fit with that of
targeted one. The amount of increment of vector 'rval1(0:nd1,iotus0)'
due to this is |n - 'nbdrnk(0,iotus0,iotus1)'| and
stored in 'rf(iotus0,iotus1)'.  Trial config. vector 'rval'
moves around due to this rule until their values converge.

After obtained this, fitness between obtained config. and
targeted config. are estimated as follows.
Consider 'iotus0'th object. Get rank order of
'dist(iotus0,0)','dist(iotus0,1)',....,'dist(iotus0,notus1)'
for targeted and obtained configuration.
Store them into 'nbdrnk2(0:1,notus1,0)' for targeted config.
and 'nbdrnk2(0:1,notus1,1)' for obtained config.
Compute sum of

{['nbdrnk2(0,notus1,0)'+'nbdrnk2(1,notus1,0)']/2
-['nbdrnk2(0,notus1,1)'+'nbdrnk2(1,notus1,1)']/2}**2.

This is D-value.


  
[3] The list of user configurable variables (all seen
in PARAMETER statement in mds.f).

notus: # of objects
nd: spatial dimension of trial config.
ds: unit of vector increments. Smaller ds means
    slower convergence. Thus, ds should be as large as possible
    within the value which does not causes oscillation or divergence.
cvchk: If increment of vector become less than this value,
       config. is regarded as converged.
ntop: max # of iteration.
rnseed: seed of random number generate initial trial config.
        (0 < rnseed <1.)
idxnbd: =0 ->  Compute rank order array nbdrnk.
        .ne. 0 -> Restore rank order array nbdrnk from fort.30
idxrval: =0 -> Generate initial trial config. from random number
        .ne. 0 -> Restore rval1 from fort.35, where final trial
	configuration is stored.
	
	
