Hi, I think that the coordinates "xa" can only be used as an input. In this constr.f routine you can only change the values of the forces and stresses of the system, as they are the only outputs coming from this routine. I guess that you are also including the section:
%block GeometryConstraints routine constr %endblock GeometryConstraints In your input "*.fdf" file. To constrain for example the movement of the "5" first atoms of the system I suggest to use this kind of code: n=5 do i = 1, n fa ( 1 , i ) = 0.d0 fa ( 2 , i ) = 0.d0 fa ( 3 , i ) = 0.d0 end do I hope this helps Óscar El 20/5/21 a las 10:40, Pablo Álvarez Rodríguez escribió: Dear SIESTA users. I am currently struggling to make constraints to certain atom blocks in SIESTA. For so, I use constr.f modified by nullifying the atomic forces by including the code line : fa(1:3,1:i)=0 where i is the number of atoms I want to constrain. Afterwards I compile the new siesta file with the modified constr.f in order to use it, but it seems it doesn't work properly, as atoms still suffer movements even after constraining them with constr.f. I don't really understand how constr.f works as I may forget something. Do I need to include anything more in order to make a working constraint, like for example, rewrite the coordinates with xa? -- Yours Sincerely Pablo Álvarez Rodríguez. . AVISO LEGAL. Este mensaje puede contener información reservada y confidencial. Si usted no es el destinatario no está autorizado a copiar, reproducir o distribuir este mensaje ni su contenido. Si ha recibido este mensaje por error, le rogamos que lo notifique al remitente. Le informamos de que sus datos personales, que puedan constar en este mensaje, serán tratados en calidad de responsable de tratamiento por la UNIVERSIDAD NACIONAL DE EDUCACIÓN A DISTANCIA (UNED) c/ Bravo Murillo, 38, 28015-MADRID-, con la finalidad de mantener el contacto con usted. La base jurídica que legitima este tratamiento, será su consentimiento, el interés legítimo o la necesidad para gestionar una relación contractual o similar. En cualquier momento podrá ejercer sus derechos de acceso, rectificación, supresión, oposición, limitación al tratamiento o portabilidad de los datos, ante la UNED, Departamento de Política Jurídica de Seguridad de la Información<https://www.uned.es/dpj>, o a través de la Sede electrónica<https://sede.uned.es/> de la Universidad. Para más información visite nuestra Política de Privacidad<https://descargas.uned.es/publico/pdf/Politica_privacidad_UNED.pdf>.
-- SIESTA is supported by the Spanish Research Agency (AEI) and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/)