Skip to content

Commit 7cbb785

Browse files
committed
modify max_heavy_atoms constraint
1 parent 039d237 commit 7cbb785

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rmgpy/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def fails_species_constraints(species):
113113

114114
max_heavy_atoms = species_constraints.get('maximumHeavyAtoms', -1)
115115
if max_heavy_atoms != -1:
116-
heavy_atoms = struct.get_num_atoms() - struct.get_num_atoms('H')
116+
heavy_atoms = struct.get_num_atoms() - struct.get_num_atoms('H') - struct.get_num_atoms('X')
117117
if heavy_atoms > max_heavy_atoms:
118118
return f"Exceeded maximumHeavyAtoms: {heavy_atoms} > {max_heavy_atoms}"
119119

0 commit comments

Comments
 (0)