Hello,

My name is Vik, I'm writing a python script that allows a user to input a
TSV (tab-separated value) file of PDB's which then edits them. I'm now
trying to change the code so that it can run directly in PyMOL instead of
having to run this python script and PyMOL separately. I'm having trouble
changing the python script so that it can run 100% in Pymol. I've pasted my
script below. Please let me know if there's a way to modify my code to
actually run in PyMOL. Thank you for your help.

Sincerely, Vik

import os

print("Files present with the .tsv extension:")
for file in os.listdir():
    if file[-4:] == ".tsv":
        print(file)

userinput = input('Enter the name of the TSV file you would like to be read:')
TSVfile = open(userinput)

#empty things filled later by script
unique = set()
f = open("ColorAndAlign.pml", "a")

#Eliminates duplicate PDBs
for row in TSVfile:
    a = row.split()
    if a[0] =="pdb":
        continue
    unique.add(a[0])
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to