Retain default file names

Computer-Aided Drug Design at the Durrant Lab Forums Gypsum-DL Retain default file names

Viewing 2 reply threads
  • Author
    Posts
    • #18469
      deepak
      Guest

      While 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!

    • #18929
      Jacob Durrant
      Keymaster

      Hi 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

    • #18932
      deepak
      Guest

      Hi,

      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" ;
      done

      This worked perfectly for me. I maintain a database in DataWarrior or in simpler cases, in a .csv

      • #20314
        Jacob Durrant
        Keymaster

        Thank you for sharing your BASH script with the community, Deepak! It should be helpful for others who run into your same situation. Take care.

Viewing 2 reply threads
  • The topic ‘Retain default file names’ is closed to new replies.