generic fragment
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | id | fragment id |
|||
integer, | public | :: | num_atoms | number of atoms |
|||
real(kind=dp), | public | :: | charge | total charge |
|||
type(atom_type), | public, | dimension(:), pointer | :: | atoms | array of atoms |
intialize fragment
calculate fragment charge (perhaps test for closeness to integer)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fragment_type), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | id | |||
type(atom_type), | intent(in), | dimension(:), target | :: | atoms |
compute the fragment centroid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fragment_type), | intent(in) | :: | this |
compute the fragment center-of-mass
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fragment_type), | intent(in) | :: | this |
compute the fragment center-of-charge
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(fragment_type), | intent(in) | :: | this |
type :: fragment_type
private
!> fragment id
integer, public :: id
!> number of atoms
integer, public :: num_atoms
!> total charge
real(dp), public :: charge
!> array of atoms
type(atom_type), dimension(:), pointer, public :: atoms
contains
private
procedure, public :: init => init_fragment
procedure, public :: centroid => fragment_centroid
procedure, public :: center_of_mass => fragment_center_of_mass
procedure, public :: center_of_charge => fragment_center_of_charge
end type fragment_type