Dear Giuseppe, Thank you for your suggestion. It is really helpful, indeed. I use the calculation = 'scf' as in your example (along with other options). But since i do not want to reoptimize the wavefunction again- i restrict the electronic scf cycle to only 1 iteration (with electron_maxstep = 1). I guess this is what the 'nscf' type of calculation would do. Since the scf can not converge for one iteration it doesn't print the eigenvalues. To print them, even if the convergence is not achieved, i use iprint = 1. With these corrections it seems to fit my needs.
Thank you, Alexey ----- Original Message ----- From: "Giuseppe Mattioli" <[email protected]> To: "PWSCF Forum" <pw_forum at pwscf.org> Sent: Saturday, June 1, 2013 7:19:58 AM Subject: Re: [Pw_forum] reusing wfc/charge density for nscf calculation with different total charge Dear Alexey I did not follow the whole thread, but I was looking at your latest input files, and I was wondering whether the options below might do the trick... &control calculation = 'scf' restart_mode='from_scratch' ... / &electrons ... startingpot = 'file' startingwfc = 'file' / They should allow you for restarting from wfc and potential calculated at the end of the scf. I always used them to perform a scf run (with Hubbard alpha, you know...) after a previous scf run. I do not know if you can start a nscf calculation from scratch, but a scf calculation with the above constraint may be useful to your purpose... HTH Giuseppe Giuseppe Mattioli ISM-CNR Italy Quoting Alexey Akimov <aakimov_guest at z.rochester.edu>: > Dear Paolo, > > First of all, thank you for your reply - i though that my message > haven't got to the forum. Yes, you are right - if i set the same > tot_charge for nscf calculation as that for scf - everything works > fine. But the idea is to use different charges for nscf (+0.25) and > scf (0.0) calculations, and at the same time use the same > wavefunction (obtained from the scf calculation). So when i try to > do that, i get the errors below. I think this is because one is not > supposed to do this kind of trick, normally. So would it be possible > to do this without digging much into the code and rather using more > standard options? > > CRASH: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > task # 0 > from potinit : error # 1 > starting and expected charges differ > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > portion of the nscf output (i run on several CPUs): > > The potential is recalculated from file : > ./x.save/charge-density.dat > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Error in routine potinit (1): > starting and expected charges differ > Error in routine potinit (1): > starting and expected charges differ > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > stopping ... > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Error in routine potinit (1): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > stopping ... > > > > > Below are the relevant portions of the scf and nscf input files: > > SCF input: > > &CONTROL > calculation = 'scf', > pseudo_dir = <my path> > outdir = './', > prefix = 'x', > / > > &SYSTEM > ibrav = 0, > celldm(1) = 1.89, > nat = 6, > ntyp = 1, > nbnd = 50, > tot_charge = 0.25, > occupations = 'smearing', > starting_magnetization(1) = 0.0, > smearing = 'gaussian', > degauss = 0.005, > ecutwfc = 40, > ecutrho = 400, > nspin = 2, > nosym = .true., > / > > > NSCF input: > > &CONTROL > calculation = 'nscf', > pseudo_dir = <my path> > outdir = './', > prefix = 'x', > / > > &SYSTEM > ibrav = 0, > celldm(1) = 1.89, > nat = 6, > ntyp = 1, > nbnd = 50, > tot_charge = 0.0, > starting_magnetization(1) = 0.0, > occupations = 'smearing', > smearing = 'gaussian', > degauss = 0.005, > ecutwfc = 40, > ecutrho = 400, > nspin = 2, > nosym = .true., > / > > > > > > ----- Original Message ----- > From: "Paolo Giannozzi" <paolo.giannozzi at uniud.it> > To: "PWSCF Forum" <pw_forum at pwscf.org> > Sent: Thursday, May 30, 2013 4:59:18 AM > Subject: Re: [Pw_forum] reusing wfc/charge density for nscf > calculation with different total charge > > On Tue, 2013-05-21 at 21:34 -0400, Alexey Akimov wrote: > >> when PW (with the input for nscf calculations for neutral system) >> tries to read the wavefunction/charge density for the charged system >> it crashes, because the expected charge is different from the one >> deduced from the wfc files > > I am not sure but if you set a charge (tot_charge) for the nscf as well, > the calculation should succeed. Note that nothing changes in the nscf > if you set a nonzero charge: only occupancies should change, not > eigenvalues, since these depend only upon the potential > > P. > -- > Paolo Giannozzi, Dept. Chemistry&Physics&Environment, > Univ. Udine, via delle Scienze 208, 33100 Udine, Italy > Phone +39-0432-558216, fax +39-0432-558222 > > _______________________________________________ > Pw_forum mailing list > Pw_forum at pwscf.org > http://pwscf.org/mailman/listinfo/pw_forum > > -- > Dr. Alexey V. Akimov > > Postdoctoral Research Associate > Department of Chemistry > University of Rochester > > aakimov_guest at z.rochester.edu > _______________________________________________ > Pw_forum mailing list > Pw_forum at pwscf.org > http://pwscf.org/mailman/listinfo/pw_forum -- ******************************************************** - Article premier - Les hommes naissent et demeurent libres et ?gaux en droits. Les distinctions sociales ne peuvent ?tre fond?es que sur l'utilit? commune - Article 2 - Le but de toute association politique est la conservation des droits naturels et imprescriptibles de l'homme. Ces droits sont la libert?, la propri?t?, la s?ret? et la r?sistance ? l'oppression. ******************************************************** Giuseppe Mattioli CNR - ISTITUTO DI STRUTTURA DELLA MATERIA v. Salaria Km 29,300 - C.P. 10 I 00015 - Monterotondo Stazione (RM) Tel + 39 06 90672836 - Fax +39 06 90672316 E-mail: <giuseppe.mattioli at ism.cnr.it> _______________________________________________ Pw_forum mailing list Pw_forum at pwscf.org http://pwscf.org/mailman/listinfo/pw_forum -- Dr. Alexey V. Akimov Postdoctoral Research Associate Department of Chemistry University of Rochester aakimov_guest at z.rochester.edu
