Esempio n. 1
0
    def _readGridContentsLattice(self):
        """Read an ascii map of grid contents.

        This update the gridContents attribute, which is a
        dict mapping grid i,j,k indices to textual specifiers
        (e.g. ``IC``))
        """
        latticeCls = asciimaps.asciiMapFromGeomAndSym(self.geom, self.symmetry)
        lattice = latticeCls()
        self.gridContents = lattice.readMap(self.latticeMap)
Esempio n. 2
0
    def _readGridContentsLattice(self):
        """Read an ascii map of grid contents.

        This update the gridContents attribute, which is a dict mapping grid i,j,k
        indices to textual specifiers (e.g. ``IC``))
        """
        latticeCls = asciimaps.asciiMapFromGeomAndSym(self.geom, self.symmetry)
        lattice = latticeCls()
        latticeMap = lattice.readMap(self.latticeMap)
        self.gridContents = dict()

        for (i, j), spec in latticeMap.items():
            if spec == "-":
                # skip placeholders
                continue
            self.gridContents[i, j] = spec