From b8bc482da402b1b8dd24345d35d6a91239c91699 Mon Sep 17 00:00:00 2001 From: Steven Rieder Date: Tue, 26 Nov 2024 13:53:51 +0100 Subject: [PATCH] Remove default number of particles --- src/amuse/ic/molecular_cloud.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/amuse/ic/molecular_cloud.py b/src/amuse/ic/molecular_cloud.py index c11e69b4ad..b1733bb2d7 100644 --- a/src/amuse/ic/molecular_cloud.py +++ b/src/amuse/ic/molecular_cloud.py @@ -9,7 +9,7 @@ def new_molecular_cloud( nf=32, power=-3.0, - target_number_of_stars=10000, + target_number_of_stars=None, ethep_ratio=0.01, convert_nbody=None, ekep_ratio=1.0, @@ -28,9 +28,12 @@ def new_molecular_cloud( if target_number_of_stars != targetN: raise ValueError( "targetN and target_number_of_stars have different values, " - "this is only allowed if targetN is None" + "this is only allowed if targetN is None and target_number_of_stars " + "is not None" ) targetN = target_number_of_stars + if target_number_of_stars is None: + raise ValueError("target_number_of_stars must be set") return molecular_cloud( nf=nf, power=power,