mirror of https://github.com/QMCPACK/qmcpack.git
nexus: more species querying support
git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6575 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
parent
12d7e7c647
commit
2ab07c0c7d
|
@ -562,6 +562,19 @@ class PhysicalSystem(Matter):
|
|||
#end for
|
||||
return elem
|
||||
#end def large_Zeff_elem
|
||||
|
||||
|
||||
def ae_pp_species(self):
|
||||
species = set(self.structure.elem)
|
||||
if self.pseudized:
|
||||
pp_species = set(self.valency.keys())
|
||||
ae_species = species-pp_species
|
||||
else:
|
||||
pp_species = set()
|
||||
ae_species = species
|
||||
#end if
|
||||
return ae_species,pp_species
|
||||
#end def ae_pp_species
|
||||
#end class PhysicalSystem
|
||||
|
||||
|
||||
|
|
|
@ -1187,6 +1187,36 @@ class Structure(Sobj):
|
|||
#end if
|
||||
#end def species
|
||||
|
||||
|
||||
def ordered_species(self,symbol=False):
|
||||
speclab_set = set()
|
||||
species_labels = []
|
||||
if not symbol:
|
||||
for e in self.elem:
|
||||
if e not in speclab_set:
|
||||
speclab_set.add(e)
|
||||
species_labels.append(e)
|
||||
#end if
|
||||
#end for
|
||||
return species_labels
|
||||
else:
|
||||
species = []
|
||||
spec_set = set()
|
||||
for e in self.elem:
|
||||
is_elem,symbol = is_element(e,symbol=True)
|
||||
if e not in speclab_set:
|
||||
speclab_set.add(e)
|
||||
species_labels.append(e)
|
||||
#end if
|
||||
if symbol not in spec_set:
|
||||
spec_set.add(symbol)
|
||||
species.append(symbol)
|
||||
#end if
|
||||
#end for
|
||||
return species_labels,species
|
||||
#end if
|
||||
#end def ordered_species
|
||||
|
||||
|
||||
def order_by_species(self,folded=False):
|
||||
species = []
|
||||
|
|
Loading…
Reference in New Issue