ninfofile¶
| Editer: | Mogu |
|---|---|
| Version: | 0.0.1dev |
| environment: | Pyton3.5.1 |
contains
- Ninfo: reads or writes dcd-files.
Note
Don’t support DNA and RNA ninfo file and Only support a protein with aicg2+ force-field!!
-
class
cafepy.files.ninfofile.Ninfo(filename)[source]¶ Ninfo class provies reading and writing ninfo-file. “Ninfo” stands for Native information. This Information comes from Native Protain structures. For example, it contains disntances beetween a pair of atoms.
The structure of ninfo file
<<<< bond ibd(int) iunit1(int) iunit2(int) Allatom(int) Allatom(int) Unitatom(int) Unitatom(int) \ bd_nat(real) factor_bd(real) correct_mgo(real) coef_bd(real) type(char(2)) ... ... >>>> <<<< angle ... ... ... >>>>
Usage in Scripts
import cafepy.files.Ninfo ntmp = Ninfo('test.ninfo') print(ntmp) # return data from interaction type. bond_data = ntmp['bond'] # list angle_data = ntmp['angle'] del ntmp['bond'][0] ntmp.write('out.file')
Members
Self.filename: Native information file name. Self.data: contains native information data from filename. Self.keys: supports interactions type. Self.rewords: for regular expression. “^bond|^angl|^aicg13|^aicgdih|^dihd|^contact” Self.**_format: for reading native information file.