| 1 | package HackaMol::Roles::QmAtomRole; | ||
| 2 | 20 | $HackaMol::Roles::QmAtomRole::VERSION = '0.051'; | |
| 3 | #ABSTRACT: simple role that provides attributes needed for setting up quantum chemistry calculations | ||
| 4 | 20 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 20 | has 'basis' => ( | |
| 7 | is => 'rw', | ||
| 8 | isa => 'Str', | ||
| 9 | predicate => 'has_basis', | ||
| 10 | clearer => 'clear_basis', | ||
| 11 | lazy => 1, | ||
| 12 | default => '6-31+G*', #to provide example; EMSL Str can be many lines... | ||
| 13 | ); | ||
| 14 | 20 | has 'ecp' => ( | |
| 15 | is => 'rw', | ||
| 16 | isa => 'Str', | ||
| 17 | clearer => 'clear_ecp', | ||
| 18 | predicate => 'has_ecp', | ||
| 19 | ); | ||
| 20 | |||
| 21 | 20 | has 'basis_geom', is => 'rw', isa => 'Str'; | |
| 22 | |||
| 23 | 20 | has 'dummy' => ( | |
| 24 | is => 'rw', | ||
| 25 | isa => 'Str', | ||
| 26 | predicate => 'is_dummy', | ||
| 27 | clearer => 'clear_dummy', | ||
| 28 | ); | ||
| 29 | |||
| 30 | 20 | ▶ | no Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 31 | |||
| 32 | 20 | 1; | |
| 33 | |||
| 34 | __END__ | ||
| 35 | |||
| 36 | =pod | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | HackaMol::Roles::QmAtomRole - simple role that provides attributes needed for setting up quantum chemistry calculations | ||
| 41 | |||
| 42 | =head1 VERSION | ||
| 43 | |||
| 44 | version 0.051 | ||
| 45 | |||
| 46 | =head1 SYNOPSIS | ||
| 47 | |||
| 48 | # instance of class that consumes the QmRole. | ||
| 49 | |||
| 50 | $obj->basis_geom('spherical'); | ||
| 51 | |||
| 52 | $obj->basis_geom('cartesian'); | ||
| 53 | |||
| 54 | $obj->dummy('bq'); | ||
| 55 | |||
| 56 | print "dummy! " if $obj->is_dummy; | ||
| 57 | |||
| 58 | $obj->clear_dummy; | ||
| 59 | |||
| 60 | print "not dummy! " unless $obj->is_dummy; | ||
| 61 | |||
| 62 | $obj->basis('SDD'); | ||
| 63 | |||
| 64 | $obj->ecp('SDD'); | ||
| 65 | |||
| 66 | =head1 DESCRIPTION | ||
| 67 | |||
| 68 | QmAtomRole provides attributes that will be useful for setting up interfaces to quantum chemistry | ||
| 69 | packages. All attributes are 'rw' and lazy, so they will not contaminate the namespace unless | ||
| 70 | called upon. The functionality for QM calculations is extended in the QmMolRole. | ||
| 71 | I have used earlier versions of these roles to load basis_sets and effective core potentials | ||
| 72 | downloaded from the EMSL basis set exchange as a single Str. https://bse.pnl.gov/bse/portal | ||
| 73 | |||
| 74 | A dream is to interface with EMSL library directly. | ||
| 75 | |||
| 76 | =head1 ATTRIBUTES | ||
| 77 | |||
| 78 | =head2 basis_geom | ||
| 79 | |||
| 80 | isa Str that is lazy and rw | ||
| 81 | |||
| 82 | =head2 dummy | ||
| 83 | |||
| 84 | isa Str that is lazy and rw | ||
| 85 | |||
| 86 | =head2 basis | ||
| 87 | |||
| 88 | isa Str that is lazy and rw | ||
| 89 | |||
| 90 | =head2 ecp | ||
| 91 | |||
| 92 | isa Str that is lazy and rw | ||
| 93 | |||
| 94 | =head1 SEE ALSO | ||
| 95 | |||
| 96 | =over 4 | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | L<HackaMol::Atom> | ||
| 101 | |||
| 102 | =item * | ||
| 103 | |||
| 104 | L<EMSL | https://bse.pnl.gov/bse/portal> | ||
| 105 | |||
| 106 | =back | ||
| 107 | |||
| 108 | =head1 AUTHOR | ||
| 109 | |||
| 110 | Demian Riccardi <demianriccardi@gmail.com> | ||
| 111 | |||
| 112 | =head1 COPYRIGHT AND LICENSE | ||
| 113 | |||
| 114 | This software is copyright (c) 2017 by Demian Riccardi. | ||
| 115 | |||
| 116 | This is free software; you can redistribute it and/or modify it under | ||
| 117 | the same terms as the Perl 5 programming language system itself. | ||
| 118 | |||
| 119 | =cut | ||