@@ -44,6 +44,22 @@ class fragpart:
44
44
write_geom: bool
45
45
Whether to write 'fragment.xyz' file which contains all the fragments
46
46
in cartesian coordinates.
47
+ remove_nonunique_frags:
48
+ Whether to remove fragments which are strict subsets of another
49
+ fragment in the system. True by default.
50
+ frag_prefix:
51
+ Prefix to be appended to the fragment datanames. Useful for managing
52
+ fragment scratch directories.
53
+ connectivity:
54
+ Keyword string specifying the distance metric to be used for edge
55
+ weights in the fragment adjacency graph. Currently supports "euclidean"
56
+ (which uses the square of the distance between atoms in real
57
+ space to determine connectivity within a fragment.)
58
+ cutoff:
59
+ Atoms with an edge weight beyond `cutoff` will be excluded from the
60
+ `shortest_path` calculation. This is crucial when handling very large
61
+ systems, where computing the shortest paths from all to all becomes
62
+ non-trivial. Defaults to 20.0.
47
63
"""
48
64
49
65
def __init__ (
@@ -55,8 +71,12 @@ def __init__(
55
71
print_frags = True ,
56
72
write_geom = False ,
57
73
be_type = "be2" ,
74
+ frag_prefix = "f" ,
75
+ connectivity = "euclidean" ,
58
76
mol = None ,
59
77
frozen_core = False ,
78
+ cutoff = 20 ,
79
+ remove_nonnunique_frags = True ,
60
80
):
61
81
# Initialize class attributes
62
82
self .mol = mol
@@ -70,9 +90,13 @@ def __init__(
70
90
self .center_idx = []
71
91
self .centerf_idx = []
72
92
self .be_type = be_type
93
+ self .frag_prefix = frag_prefix
94
+ self .connectivity = connectivity
73
95
self .frozen_core = frozen_core
74
96
self .iao_valence_basis = iao_valence_basis
75
97
self .valence_only = valence_only
98
+ self .cutoff = cutoff
99
+ self .remove_nonnunique_frags = remove_nonnunique_frags
76
100
77
101
# Initialize class attributes necessary for mixed-basis BE
78
102
self .Frag_atom = []
@@ -98,12 +122,13 @@ def __init__(
98
122
elif frag_type == "graphgen" :
99
123
fragment_map = graphgen (
100
124
mol = self .mol .copy (),
101
- be_type = be_type ,
102
- frozen_core = frozen_core ,
103
- remove_nonunique_frags = True ,
104
- frag_prefix = "f" ,
105
- connectivity = "euclidean" ,
106
- iao_valence_basis = iao_valence_basis ,
125
+ be_type = self .be_type ,
126
+ frozen_core = self .frozen_core ,
127
+ remove_nonunique_frags = self .remove_nonnunique_frags ,
128
+ frag_prefix = self .frag_prefix ,
129
+ connectivity = self .connectivity ,
130
+ iao_valence_basis = self .iao_valence_basis ,
131
+ cutoff = self .cutoff ,
107
132
)
108
133
109
134
self .fsites = fragment_map .fsites
0 commit comments