[Tutor] Pointers Towards Appropriate Python Methods

Stephen P. Molnar s.molnar at sbcglobal.net
Sun Sep 29 14:28:26 EDT 2019


First, let me state that this is not a homework problem.   I happen to 
be a retired Research Chemist whose rathre meager programming skills are 
in FORTRAN.

I have managed to write, and with help from the list debug, a very short 
Python script to extract a column of data from an ASCII file:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

Created on Tue Sep 24 07:51:11 2019

"""
import numpy as np

fileName = []

name = input("Enter Molecule ID: ")

name_in = name+'_apo-1acl.RMSD'

data = np.genfromtxt(name_in, usecols=(3), dtype=None, skip_header=8, 
skip_footer=1, encoding=None)


I have uploaded the script and an example of the input file to my 
Dropbox account in order to avoid scrambling of the file format.

https://www.dropbox.com/sh/xwsv17vkh48tsaa/AAAfIe0miWrrk49hqZCkxe-aa?dl=0

My problem is that I have a large number of data files that I wish to 
process for input to several other different Python scripts that I use 
as part of my Computational Chemistry research program.   I've also 
uploaded a bash script that illustrates what I want to do in Python.

At this point what I would like are pointers towards python method for 
processing a large number of data files. I'm not asking anyone to write 
the coed for me.

Thanks in advance.

-- 
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1



More information about the Tutor mailing list