02 Jul 2004 18:22:49 UTC
- Distribution: Chemistry-File-Mopac
- Module version: 0.15
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (352 / 0 / 0)
- KwaliteeBus factor: 1
- 91.67% Coverage
- License: unknown
- Activity24 month
- Download (6.6KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionITUB Ivan Tubert-Brohman
Chemistry::File::Mopac - MOPAC 6 input file reader/writer
use Chemistry::File::Mopac; # read a MOPAC file my $mol = Chemistry::Mol->read('file.mop'); # write a MOPAC file using cartesian coordinates $mol->write('file.mop', coords => 'cartesian'); # now with internal coordinates $mol->write('file.mop', coords => 'internal'); # rebuild the Z-matrix from scratch while we are at it $mol->write('file.mop', rebuild => 1);
This module reads and writes MOPAC 6 input files. It can handle both internal coordinates and cartesian coordinates. It also extracts molecules from summary files, defined as those files that match /SUMMARY OF/ in the third line. Perhaps a future version will extract additional information such as the energy and dipole from the summary file.
This module registers the
mopformat with Chemistry::Mol. For detection purposes, it assumes that filenames ending in .mop or .zt have the Mopac format, as well as files whose first line matches /am1|pm3|mndo|mdg|pdg/i (this may change in the future).
When the module reads an input file into $mol, it puts the keywords (usually the first line of the file) in $mol->attr("mopac/keywords"), the comments (usually everything else on the first three lines) in $mol->attr("mopac/comments") and $mol->name, and the internal coordinates for each atom in $atom->internal_coords.
When writing, the kind of coordinates used depend on the
coordsoption, as shown in the SYNOPSIS. Internal coordinates are used by default. If the molecule has no internal coordinates defined or the rebuild option is set, the build_zmat function from Chemistry::InternalCoords::Builder is used to renumber the atoms and build the Z-matrix from scratch.
When writing a Mopac file, this version marks all coordinates as variable (for the purpose of geometry optimization by Mopac). A future version should have more flexibility.
Ivan Tubert-Brohman <email@example.com>
Copyright (c) 2004 Ivan Tubert. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Chemistry::File::Mopac, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Chemistry::File::Mopac
For more information on module installation, please visit the detailed CPAN module installation guide.