fn parse_atom_list(i : &str, num_atoms : i32) -> IResult<&str, Vec<&str>> {
    let mut trimmed = i;
    let mut atoms : Vec<&str> = Vec::new();

    for _i in 0..num_atoms {
        // This section parses the 3d coordinates up the element character
        // For each 3d coordinate
        for _x in 0..3 {
            trimmed = whitespace(trimmed).unwrap().0;
            trimmed = not_whitespace(trimmed).unwrap().0;
        }
        // for the remaining whitespace before the element
        trimmed = whitespace(trimmed).unwrap().0;

        // takes the element char and adds it to the atoms vector
        let to_add = not_whitespace(trimmed).unwrap().1;
        atoms.push(to_add);
        
        // Goes to the next line
        trimmed = not_newline(trimmed)?.0;
        
        debug_println!("{}", trimmed);
    }
    
    Ok((trimmed, atoms))
}
// parses the atom section, returning the list of atoms as a vector
parses the atom section, returning the list of atoms as a vector
parses the atom section returning the list of atoms as a vector
fn parse_atom_list(i : &str, num_atoms : i32) -> IResult<&str, Vec<&str>> {
    let mut trimmed = i;
    let mut atoms : Vec<&str> = Vec::new();
    for _i in 0..num_atoms {
        // This section parses the 3d coordinates up the element character
        // For each 3d coordinate
        for _x in 0..3 {
            trimmed = whitespace(trimmed).unwrap().0;
            trimmed = not_whitespace(trimmed).unwrap().0;
        }
        // for the remaining whitespace before the element
        trimmed = whitespace(trimmed).unwrap().0;
        // takes the element char and adds it to the atoms vector
        let to_add = not_whitespace(trimmed).unwrap().1;
        atoms.push(to_add);
        // Goes to the next line
        trimmed = not_newline(trimmed)?.0;
        debug_println!("{}", trimmed);
    }
    Ok((trimmed, atoms))
}
fn parse_atom_list ( i : & str , num_atoms : i32 ) -> IResult < & str , Vec < & str > > { let mut trimmed = i ; let mut atoms : Vec < & str > = Vec :: new ( ) ; for _i in 0 .. num_atoms { // This section parses the 3d coordinates up the element character // For each 3d coordinate for _x in 0 .. 3 { trimmed = whitespace ( trimmed ) . unwrap ( ) . 0 ; trimmed = not_whitespace ( trimmed ) . unwrap ( ) . 0 ; } // for the remaining whitespace before the element trimmed = whitespace ( trimmed ) . unwrap ( ) . 0 ; // takes the element char and adds it to the atoms vector let to_add = not_whitespace ( trimmed ) . unwrap ( ) . 1 ; atoms . push ( to_add ) ; // Goes to the next line trimmed = not_newline ( trimmed ) ? . 0 ; debug_println ! ( " " trimmed ) ; } Ok ( ( trimmed , atoms ) ) }
parses the atom section, returning the list of atoms as a vector
parses the atom section returning the list of atoms as a vector
i
&str
num_atoms
i32
i
&str
num_atoms
i32