[Pw_forum] constrained_magnetization
Lorenzo Paulatto
paulatto at sissa.it
Wed Jun 3 12:55:52 CEST 2009
In data 03 giugno 2009 alle ore 12:40:32, chu-chun fu <chuchun.fu at cea.fr>
ha scritto:
> Will appreciate if possible that you let me know which subroutines would
> be modified to do such a constraint ?
Well, in add_bfield you can change lambda from a scalar to an array of
size ntyp[es] (or even nat[oms]!) and apply zero penalty to the species
you want to leave free. It can be done the "proper" way, so that you can
read it from the input file, but it is a bit cumbersome; it would require
changes in Modules/input_parameters.f90 and PW/input.f90 and it may have
possible unexpected side-effect in other parts of add_bfield.
Just hard-coding it in add_bfield.f90 should work for you, but if you want
to add it as a code feature you are very welcome.
best regards
--
Lorenzo Paulatto
SISSA & DEMOCRITOS (Trieste)
phone: +39 040 3787 511
skype: paulatz
www: http://people.sissa.it/~paulatto/
*** save italian brains ***
http://saveitalianbrains.wordpress.com/
More information about the users
mailing list