-
Notifications
You must be signed in to change notification settings - Fork 0
Contribution guide
[TOC]
It is easy to come across some methods used by several modules, especially the QuantumESPRESSO.Cards
, QuantumESPRESSO.Namelists
and QuantumESPRESSO.QuantumESPRESSOInput
modules and their submodules. Because Namelist
s and Card
s, etc., can share similar interfaces. For example, the name
and to_qe
methods. But if not writing carefully, they could cause name conflicting. For instance, if you define name
methods in QuantumESPRESSO.Cards
and QuantumESPRESSO.Namelists
separately. When loaded first by one and then the other, the generate name conflicts. A way to solve this is in an upper-level module (QuantumESPRESSO
here), define a generic name
. Then in each module mentioned above, using QuantumESPRESSO
, and extend QuantumESPRESSO.name
.
When using, write like this
using QuantumESPRESSO
Then all extended name
methods will be loaded.