ReadMagiC()
Reads sets of desired functions from MagiC core output file.
Main function for reading data from MagiC.Core log-files. It reads sets of functions as specified by DFType-parameter from all files listed in ifile
and returns a list of DFset.
- Parameters:
-
- ifile
- The file or list of files to read.
- DFType
- Which function to read, five options are available:
- 'RDF': sampled RDFs,
- 'RDFref': reference RDF,
- 'Pot': potential used at the iteration,
- 'PotNew': potential generated after the iteration,
- 'PotCorr': potential correction applied after the iteration
- iters
- : Which iterations to read. Default None, read all iterations. Ex: “iters=(1,2,3,4)“
- test
- : If True, read results of the intermediate convergence tests
- quiet
- : Suppress output, Default False
- These parameters are rarely used:
-
- mcmfile
- : (optional, autodetected) List of molecular-topology files to read AtomTypes and bond definitions.
- PairNamesList
- : (optional, autodetected) List of pairs of atomic names to search in output file.
It consists of three sublists: non-bonded pair interactions, bonded pair interactions, bending angle (1-3) bond interactions.
Returns:
List of DFset objects: [DFset1, DFset2, ...]
Examples:
1. Fully automatic: Read RDFs for all pairs and bonds and from all iterations. Autodetect mcmfiles.
RDFs = MT.ReadMagiC(['01.magic.out', '02.magic.out'], DFType='RDF', quiet=True)
2. Reading potentials on iteration 1,2,3,
Pot=MT.ReadMagiC('03.magic.out', iters=(1,2,3), DFType='Pot',
PairNamesList=[['N-N','N-P'], ['N-P','P-C1'], ['N-C1-P']])
3. Reading corrections to the potentials applied on the iteration 5, and specify the mcmfile
PotCorr=MT.ReadMagiC('03.magic.out', iters=(5), DFType='PotCorr',
mcmfile='dmpc_NM.CG.mcm')