Notice: The 3DNA Forum is now a read-only archive. See the announcement.
All active support and discussions have moved to GitHub Discussions!

Author Topic: overwritten output files  (Read 214353 times)

Offline Mamta

  • non-commercial
  • with-posts
  • *
  • Posts: 3
    • View Profile
overwritten output files
« on: January 13, 2025, 04:52:30 am »
Dear all,
I am analyzing the helical parameters of DNA using 3700 frames from my MD simulation, with each frame having a corresponding `.bps` file. When using a `for` loop with the `analyze` command, the output is being overwritten instead of being saved in separate files for each frame.I am using x3dna-v2.4 version. Is it possible to configure the program so that it records the data for all frames without overwriting the output?                                                                                                              Thanks for your help!
Mamta

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1746
    • View Profile
    • 3DNA homepage
Re: overwritten output files
« Reply #1 on: January 13, 2025, 08:30:07 am »
Hi Mamta,

Thanks for using 3DNA/DSSR and for posting your question on the 3DNA Forum. Could you please be specific with the command you used? The x3dna-v2.4 suite comes with a Ruby script 'x3dna_ensemble' for analyzing MODEL/ENDMDL delineated ensemble of NMR or MD structures. The x3dna-dssr program has an --nmr (--md) option that streamline the analysis of such ensembles.

Best regards,

Xiang-Jun
Dr. Xiang-Jun Lu[律祥俊]
Email: xiangjun@x3dna.org
Homepage: https://x3dna.org
wDSSR: https://web.x3dna-dssr.org
GitHub: https://github.com/x3dna-dssr

Offline Mamta

  • non-commercial
  • with-posts
  • *
  • Posts: 3
    • View Profile
Re: overwritten output files
« Reply #2 on: January 13, 2025, 10:00:17 am »
Hi Xian- Jung,
thanks for your quick response.
I use the simple script of 3dna -
 for i in $(seq 1 3700); do
    find_pair output-filename.pdb.${i} frame${i}.bps
    analyze frame${i}.bps
done

Thanks
Mamta

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1746
    • View Profile
    • 3DNA homepage
Re: overwritten output files
« Reply #3 on: January 13, 2025, 10:47:57 am »
Hi Mamta,

The output file name is derived from the input PDB filename, by deleting extension and add ".out". Since your PDB frame is named "output-filename.pdb.${i}", the output file will always be "output-filename.pdb.out" by replacing ".{i}" with ".out". You could name your PDB frame "output-${i}.pdb" and the corresponding output file will be "output-${i}.out".

Have a look of the C source code, and the x3dna_ensemble script (x3dna_ensemble analyze -h). Overall, the x3dna-v2.4 support for MD analysis is limited. There is also do_x3dna -- I'm not sure if it is still actively maintained.

I'm in the process of incorporating x3dna-v2.4 features into DSSR (Free academic license available from CTV). Further improvement for MD support will be implemented in DSSR.

Best regards,

Xiang-Jun
Dr. Xiang-Jun Lu[律祥俊]
Email: xiangjun@x3dna.org
Homepage: https://x3dna.org
wDSSR: https://web.x3dna-dssr.org
GitHub: https://github.com/x3dna-dssr

 

This forum is archived. Please post new questions on GitHub Discussions!