thank for your reply, but 
cellside: fixes the unit-cell side lengths to their initial values (not
implemented yet).
cellangle: xes the unit-cell angles to their initial values (not
implemented yet).

so my meaning
1. is that my consstr.f is right or not:
2. should i use  MD.VariableCell =T ans well as the %block
GeometryConstraints at the same time?


On Sun, Jun 15, 2014 at 2:44 AM, Mostafa Shabani <
[email protected]> wrote:

> Hi
> use GeometryConstraints
> fore example
>
> %block GeometryConstraints
> cellside c
> cellangle alpha beta gam
> position from -1 to -10
> rigid 1 2
> center 1 2 0.0 0.0 1.0
> stress 4 5 6
> routine constr
> %endblock GeometryConstraints
>
>
> On Sun, Jun 15, 2014 at 1:04 AM, xu yuehua <[email protected]> wrote:
>
>>
>> Hi,all:
>>
>> i want to relax the geometry of the cell, but i only need relax the c
>> cellside, and fix the a, b side.
>>
>> according to the manual;
>>
>> i rewrite the cinstr.f the code is
>>
>> *! and J.M.Soler, 1996-2006.*
>> *! *
>> *! Use of this software constitutes agreement with the full conditions*
>> *! given in the SIESTA license, as signed by all legitimate users.*
>> *!*
>> *c $Id: constr.f,v 1.6 2003/06/23 09:46:16 ordejon Exp $*
>>
>> *      subroutine constr( cell, na, isa, amass, xa, stress, fa, ntcon )*
>> *c ******************************************************************
>> *c User-written routine to implement specific geometric constraints,*
>> *c by orthogonalizing the forces and stress to undesired changes.*
>> *c Arguments:*
>> *c real*8  cell(3,3)    : input lattice vectors (Bohr)*
>> *c integer na           : input number of atoms*
>> *c integer isa(na)      : input species indexes*
>> *c real*8  amass(na)    : input atomic masses*
>> *c real*8  xa(3,na)     : input atomic cartesian coordinates (Bohr)*
>> *c real*8  stress( 3,3) : input/output stress tensor (Ry/Bohr**3)*
>> *c real*8  fa(3,na)     : input/output atomic forces (Ry/Bohr)*
>> *c integer ntcon        : total number of positions constr. imposed*
>> *c ******************************************************************
>> *      implicit         none*
>> *      integer          na, isa(na), ntcon*
>> *      double precision amass(na), cell(3,3), fa(3,na),*
>> *     .                 stress(3,3), xa(3,na)*
>>
>> *c Write here your problem-specific code.*
>> *      stress(1,2) = 0.0d0*
>> *      stress(1,3) = 0.0d0*
>> *      stress(1,1) = 0.0d0*
>>
>> *      stress(2,1) = 0.0d0*
>> *      stress(2,2) = 0.0d0*
>> *      stress(2,3) = 0.0d0*
>>
>> *      stress(3,1) = 0.0d0*
>> *      stress(3,2) = 0.0d0*
>> *c      stress(3,3) = 0.0d0*
>> *      return*
>>
>> *      end*
>>
>> am i right?
>>
>> my question is in the fdf input file, Should i set the MD.VariableCell =T
>>
>> and also Set
>> %block GeometryConstraints
>> routine constr
>> %endblock GeometryConstraints
>>
>>
>> or set the latter only, let the  MD.VariableCell =F
>>
>> i need your help
>>
>> thanks very much!
>> --
>> unl chemistry department
>>
>
>


-- 
lalala lalala

Responder a