Dear Siesterers

I am using the constr.f function to provide geomtry constraints. I've
looked in the manual, and through the mailing lists, and I cant find
or deduce a reliable formula for ntcon (one of the return parameters
for constr.f)

I've understood the manual example, that if there's two atoms but only
a relative distance, then ntcon is incrmemented by just 1. This is
easy for the simple cases but what about something more complex: say,
if there are 5 groups of 4 diatomic molecules, each molecule being
identical, and the relative positions of each of the 4 diatomics in
each group being the same. In this case, there's a number of different
ways I can write ntcon depending on what I define as relative
position.

So, what's the approach, or what's the key part of the code to look at
to deduce a value for ntcon?


Looking through the source code, I actually was tempted just to add

ntcon = ntcon+1

to constr.f. This was because if you look at fixed.f you find the block


! Apply constraints
ntcon = 0
do ic = 1,nc
if (ctype(ic) .eq. 'routine') then
call constr( cell, na, isa, amass, xa, cstress, cfa, ntcon )
elseif (ctype(ic) .eq. 'position') then
 ntcon = ntcon + 1

which suggests an incrmental approach.

I'm sure there's an obvious answer to this, but I'm just not seeing it
at the moment.

With thanks

Ian Shuttleworth

Responder a