Computer-Aided Drug Design at the Durrant Lab › Forums › Gypsum-DL › Retain default file names
- This topic has 3 replies, 1 voice, and was last updated 4 years, 2 months ago by
Jacob Durrant.
- AuthorPosts
- November 10, 2020 at 9:46 pm #18469
deepak
GuestWhile preparing a file using SMILES notation, I use a structure code for each molecule. However, an input of something like "SMI_1" give the output "SMI_1__input1__variant1." Is there a way I can retain the original name and not have the variant descriptions appended to it?
I believe this would involve changing the output script, but I am looking for a way this feature could be turned off using an input string.
Thank you!
- November 15, 2020 at 7:36 am #18929
Jacob Durrant
KeymasterHi deepak. Much thanks for your interest in Gypsum-DL. The program automatically adds the
__variantX
suffix because in some circumstances there are multiple molecular variants for each input molecule. For example, a carboxylate group could be protonated or deprotonated, so there must be some way to distinguish between the two alternately protonated output files.Since keeping track of these different variants is one of Gypsum-DL’s core functionalities, the renaming is hardcoded and can’t be turned off with a user parameter. You might consider writing a little script (for example in Python or BASH) that renames files if that’s essential for your workflow.
Hope this answer helps. Take care,
Jacob
- November 15, 2020 at 5:19 pm #18932
deepak
GuestHi,
After going through the code, I understood that this might be the case. In most cases, I usually generate only one variant. Therefore, I write the following bash script to rename files in a path.
for STRUCTURE in *.pdb ;
do mv "${STRUCTURE}" "${STRUCTURE:0:10}.pdb" ;
doneThis worked perfectly for me. I maintain a database in DataWarrior or in simpler cases, in a .csv
- December 4, 2020 at 6:34 am #20314
Jacob Durrant
KeymasterThank you for sharing your BASH script with the community, Deepak! It should be helpful for others who run into your same situation. Take care.
- AuthorPosts
- The topic ‘Retain default file names’ is closed to new replies.