[Octopus-devel] Small code reorganization proposal.

Xavier Andrade xavier at tddft.org
Tue Apr 24 16:40:21 WEST 2012


Hi José Rui,

The v_ks_m depends on things like the KSI routines and the OEP, that
depend on the Hamiltonian. So it cannot be moved before the
hamiltonian directory in the dependency chain. Also, your
justification should be something better than " I think this is a good
idea mainly because it will make life much easier for anyone trying to
implement any kind of subsystem approaches to DFT", you should explain
why.

Xavier

2012/4/24 José Rui Faustino Sousa <jrfsousa at teor.fis.uc.pt>:
> Hi All!
>
> I would like to propose removing:
>
>    type(v_ks_t)             :: ks    !< the Kohn-Sham potentials
>    type(output_t)           :: outp  !< the output
>
> from the type system_t defined in the file ./src/system/system.F90
>
> And moving the file down in the dependencies chain to just
> above ./src/states.
>
> This would also imply moving the subroutine system_h_setup to, say, the
> file v_ks.F90 and renaming the actual system directory to, say, ks.
>
> I think this is a good idea mainly because it will make life much easier
> for anyone trying to implement any kind of subsystem approaches to DFT,
> and also because it creates a clearer picture of the physics behind
> everything, creates a natural border for the systems details and will
> allow for simpler and cleaner subroutine interfaces.
>
> I have already done it locally and tested it with no problems.
>
> Does anyone see any reason not to do it?
>
> Additionally the ./src/system could be split in ./src/system containing
> the actual system.F90 file and future implementations of
> subsystems, ./src/eigen containing the eigensolvers, ./src/ks containing
> the Kohn-Sham term and ./src/output containing the output routines.
>
> Further on one could create an extra type to hold:
>
>    type(system_t)      :: sys
>    type(v_ks_t)        :: ks    !< the Kohn-Sham potentials
>    type(hamiltonian_t) :: hm
>    type(output_t)      :: outp  !< the output
>
> instead of just adding:
>
>    type(v_ks_t)        :: ks    !< the Kohn-Sham potentials
>    type(output_t)      :: outp  !< the output
>
> to ./src/main/run.F90
>
> But these are just embellishments and are not really necessary.
>
> Best regards,
> José Rui
>
> _______________________________________________
> Octopus-devel mailing list
> Octopus-devel at tddft.org
> http://www.tddft.org/mailman/listinfo/octopus-devel


More information about the Octopus-devel mailing list