MM_FILE_IO


Function

MM_File_IO contains procedures for processing and reading and writing MM files.

Full details about the use of this module and the format of a MM file can be found in chapter 5 of the book A Practical Introduction to the Simulation of Molecular Systems.

Dependencies

Module Variables
CONSTANTS KCAL_TO_KJ, TO_RADIANS
DEFINITIONS DP, FORCE_FIELD, MAX_RECORD_LENGTH, VERSION
FILES NEXT_UNIT
IO_UNITS INPUT, OUTPUT
PARSING Most public items in the module.
STATUS ERROR
MM_FILE_DATA Most public items in the module.
SEQUENCE RESIDUE_NAME_LENGTH


Public Variables

None.

Public Procedures

There are three public subroutines in this module.

SubroutinePurpose
MM_FILE_PROCESS Process a formatted MM file.
MM_FILE_READ Read a binary processed MM file.
MM_FILE_WRITE Write a binary processed MM file.


MM_FILE_PROCESS

Argument Type Intent Optional Purpose
FILE_OUT Character ( Len = * ) In No The name of the processed binary MM file.
FILE_IN Character ( Len = * ) In Yes The name of the formatted MM file.


Error Meaning
Input file I/O error. There is a problem with the input MM file.
Scratch file I/O error. There is a problem with the scratch file that the subroutine needs.
Invalid file header. There is a missing `MM_Definitions' tag in the input file.
Invalid FORCE FIELD. The force field of the input file is not recognized.
Invalid file version number. There is a mismatch between the MM file and library version numbers.
TYPES section not present. There is a missing `Types' tag.
Unrecognized section keyword. There is an unknown section keyword.
RESIDUES section missing. There is a `Residues' tag missing.
Unknown residue name for VARIANT declaration. A residue in a VARIANT statement is unknown.
Duplicate ANGLES keyword. There are two or more `Angles' blocks.
Invalid angle parameter types. Unable to find the atom types given in an angle declaration.
Duplicate angle parameter. There are duplicate angle parameter declarations.
Duplicate BONDS keyword. There are two or more `Bonds' blocks.
Invalid bond parameter type. Unable to find the atom types given in a bond declaration.
Duplicate bond parameter. There are duplicate bond parameter declarations.
Duplicate DIHEDRALS keyword. There are two or more `Dihedrals' blocks.
Invalid dihedral parameter types. Unable to find the atom types given in a dihedral declaration.
Duplicate dihedral parameter. There are duplicate dihedral parameter declarations.
Duplicate ELECTROSTATICS keyword. There are duplicate electrostatics parameter declarations.
Unrecognized ELECTROSTATICS keyword. An electrostatics keyword is unrecognized.
Duplicate IMPROPERS keyword. There are two or more `Impropers' blocks.
Invalid improper parameter types. Unable to find the atom types given in an improper declaration.
Duplicate improper parameter. There are duplicate improper parameter declarations.
Duplicate LENNARD_JONES keyword. There are duplicate Lennard-Jones parameter declarations.
Unrecognized LENNARD_JONES keyword. A Lennard-Jones keyword is unrecognized.
Duplicate LINKS keyword. There are two or more `Links' blocks.
Missing LINK keyword. There is a missing `Link' tag.
Link name too long. The name of the link is too long.
Missing LINK or END keyword. There is an error in the link specification as the subroutine expects another `Link' or `End' tag.
Duplicate LINK names. There are two links with the same name.
Duplicate PARAMETERS keyword. There are two or more `Parameters' blocks.
Unrecognized PARAMETER keyword. There is an unknown `Parameters' sub-block.
Duplicate RESIDUES keyword. There are two or more `Residues' blocks.
Missing RESIDUE keyword. There is a missing `Residue' tag.
Residue name too long. A residue name is too long.
Atom name too long. An atom name is too long.
Duplicate atom name in residue. There are two atoms with the same name in a residue.
Unknown type for atom in residue. An atom in a residue specification has an unknown type.
Unknown atom name in bond. An atom in a bond specification is unknown.
Atom names same in bond. There is a bond between the same atom.
Unknown atom name in improper. An atom in an improper specification is unknown.
Atom names same in improper. There is an improper that involves the same atom.
Missing RESIDUE or END keyword. There is an error in the residue specification as the subroutine expects another `Residue' or `End' tag.
Duplicate RESIDUE names. There are two residues with the same name.
An atom has been deleted twice. An atom in a VARIANT statement cannot be deleted twice.
An atom has been added twice. An atom in a VARIANT statement cannot be added twice.
The type of the atom to be added is unknown. The type of an atom to add in a VARIANT statement is unknown.
An atom's charge has been changed twice. An atom in a VARIANT statement cannot have its charge changed twice.
Atom names same in variant bond. There is a bond between the same atom in a VARIANT statement.
Atom names same in variant improper. There is an improper involving the same atom in a VARIANT statement.
TYPE name too long. The name of an atom type is too long.
Type name `X' is reserved. An atom type cannot be named `X'.
Duplicate TYPE name. There are two atom types with the same name.
Duplicate UNITS keyword. There are two or more `Units' blocks.
Unrecognized UNITS keyword. There is an unrecognized `Units' keyword.
Duplicate VARIANTS keyword. There are two or more `Variants' blocks.
Missing VARIANT keyword. There is a missing `Variant' tag.
Variant name too long. The name of the variant is too long.
Missing VARIANT or END keyword. There is an error in the variant specification as the subroutine expects another `Variant' or `End' tag.
Duplicate VARIANT names. There are two variants with the same name.




MM_FILE_READ

Argument Type Intent Optional Purpose
FILE Character ( Len = * ) In No The name of the processed binary MM file.


Error Meaning
I/O Error. There is a problem with the binary MM file.
Invalid MM file header. There is a mismatch between the version number of the library and the force fields that it can handle and those present in the processed file.




MM_FILE_WRITE

Argument Type Intent Optional Purpose
FILE Character ( Len = * ) In No The name of the processed binary MM file.


Error Meaning
I/O Error. There is a problem with the binary MM file.




Stability

Stable.



Back to the DYNAMO Home-Page.