CHARMM Development Project
Posted By: ASmittie Writing output from correl with dumb - 09/14/21 12:08 AM
I am working on extracting two adjacent dihedral angles from a simulation of previtamin D3. I want to write the correl function data into a non-binary format that can be accessed later by matlab for generating plots. I have been using write phi1 unit 22 dumb time, which gives the file format that I want, but assigns the file name fort.22 which I don't want. Can I write out the same format as dumb while specifying a file name?
Posted By: rmv Re: Writing output from correl with dumb - 09/14/21 01:58 AM
Precede the WRITE with an OPEN--

open unit 22 write card name phi1.txt
Posted By: ASmittie Re: Writing output from correl with dumb - 09/15/21 07:22 PM
Thanks for the response Rick!
That clued me in to the fact that I was only writing the correl function to the card but was not also telling CHARMM to write that card to a new file. It works perfect when I use the following:

! RESIDUE 1
enter ph1a dihed sele segid HETA .and. resid 1 .and. ( type C23 .or. type C19 .or. type C17 .or. type C15 ) end
enter ph1b dihed sele segid HETA .and. resid 1 .and. ( type C17 .or. type C15 .or. type C9 .or. type C12 ) end
traj firstu 61 skip 5000 nunit 1

open unit 22 write card name res_1_phi_1.dat
write ph1a unit 22 dumb time
* RESIDUE 1 phi1 dihedral angles
*
Posted By: rmv Re: Writing output from correl with dumb - 09/16/21 01:28 AM
You can also write both time series to a single file via

edit ph1a veccod 2
open unit 22 write card name res_1_phi_1.dat
write ph1a unit 22 dumb time
* RESIDUE 1 phi1 dihedral angles
*


The key is that time series combined in this way must be declared via sequential ENTER statements, as you've done above.
© CHARMM forums