Hi Valerio, If you are running in nogui, there is no reply log. The output that would normally go to the reply log should be appearing on your shell's standard output. You just redirect the output to a file using your shell's builtin redirection capabilities. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jan 30, 2024, at 12:59 AM, valerio chiarini via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Responsible,
I am trying to acquaint myself with "chimera --nogui --script" mode in order to automatize some pdb processing for a pipeline. I manage to search for pdb, to open the file, to select residues and to calculate COM for the selection. On the shell, I get the COM coordinates but I would like to print or store them to write them elsewhere. So the question is how can I print the replylog from shell to a text file, under the --nogui mode? I have tried with saveReplyLog but it doesn't seem to work...Any suggestions are appreciated.
This is an excerpt from what I'm writing so far:
import os from chimera import runCommand as rc from chimera import replyobj from chimera import saveReplyLog
#change to the folder containing the pdb files os.chdir("xxx/yyy/zzz/ABC.pdb")
def find_string_with_substring(string, substring): for s in strings: if substring in s: return s return None
# list_files contain only the .pdb files list_pdb_files = [fn for fn in os.listdir(".") if fn.endswith(".pdb")]
# specify the characters 'HLA' you want the filenames contain HLA_characters = HLA
file_pdb_HLA = fins_string_with_substring(list_pdb_files, HLA_characters)
print(list_pdb_files)
print(file_pdb_HLA)
nome = file_pdb_HLA
replyobj.status(Processing " + nome)
rc ("open " + nome) rc ("select :1.232") rc("measure center sel")
saveReplyLog("~/reply-log.txt")
Thank you so much
-- Dr. Valerio Chiarini
_Senior Scientist_
Proteins & Monoclona Antibodies Department b Takis Biotech
c/o Tecnopolo
Via di Castel Romano, 100
00128 Rome, Italy
Tel.: +39 06-50576077
Fax: +39 06-50576710
Email: chiarini@takisbiotech.it
Web: http://www.takisbiotech.it 196/03_
_Le informazioni contenute in questa comunicazione e gli eventuali documenti allegati hanno carattere confidenziale, sono tutelate dal segreto professionale e sono ad uso esclusivo del destinatario. Nel caso questa comunicazione Vi sia pervenuta per errore, Vi informiamo che la sua diffusione e riproduzione C( contraria alla legge e preghiamo di darci prontamente avviso e di cancellare quanto ricevuto. __Grazie._
_This e-mail message and any files transmitted with it are subject to attorney-client privilege and contain confidential information intended only for the person(s) to whom it is addressed. If you are not the intended recipient, you are hereby notified that any use or distribution of this e-mail is strictly prohibited: please notify the sender and delete the original message. __Thank you._ _______________________________________________ Chimera-users mailing list -- chimera-users@cgl.ucsf.edu To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/