File Coverage

blib/lib/HackaMol/Roles/QmAtomRole.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


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