io_mod.py
def atomic_positions_to_list(apos_str):
    """
     Convert a atomic_positions block (as in Qespresso) into a list like:

    [['Pb', '0.0', '0.0', '0.0'], ['Br', '0.0', '0.0', '0.5'], ...]

    Most interested in the atoms' names rather than their positions 
    """
    res = []
    for l in apos_str.split('\n'):
        words = l.split()
        if len(words) >= 4 and len(words[0]) < elem_maxl:
            # *** There should be more robust sanity checks: check elements
            res.append(words)
    return res

     Convert a atomic_positions block (as in Qespresso) into a list like:

    [['Pb', '0.0', '0.0', '0.0'], ['Br', '0.0', '0.0', '0.5'], ...]

    Most interested in the atoms' names rather than their positions 
    


Most interested in the atoms' names rather than their positions
Most interested in the atoms ' names rather than their positions
def atomic_positions_to_list(apos_str):
    res = []
    for l in apos_str.split('\n'):
        words = l.split()
        if len(words) >= 4 and len(words[0]) < elem_maxl:
            res.append(words)
    return res
def atomic_positions_to_list ( apos_str ) : res = [ ] for l in apos_str . split ( '\n' ) : words = l . split ( ) if len ( words ) >= 4 and len ( words [ 0 ] ) < elem_maxl : res . append ( words ) return res
Convert a atomic_positions block (as in Qespresso) into a list like:
[['Pb', '0.0', '0.0', '0.0'], ['Br', '0.0', '0.0', '0.5'], ...]
Convert a atomic_positions block ( as in Qespresso ) into a list like : [[ ' Pb ' ' 0 . 0 ' ' 0 . 0 ' ' 0 . 0 ' ] [ ' Br ' ' 0 . 0 ' ' 0 . 0 ' ' 0 . 5 ' ] ... ]
"""
     Convert a atomic_positions block (as in Qespresso) into a list like:

    [['Pb', '0.0', '0.0', '0.0'], ['Br', '0.0', '0.0', '0.5'], ...]

    Most interested in the atoms' names rather than their positions 
    """ # *** There should be more robust sanity checks: check elements
apos_str