diff --git a/default_hypers/default_hypers.yaml b/default_hypers/default_hypers.yaml index d4422c9..d00b141 100644 --- a/default_hypers/default_hypers.yaml +++ b/default_hypers/default_hypers.yaml @@ -27,9 +27,12 @@ ARCHITECTURAL_HYPERS: K_CUT: None # should be float; only used when USE_LONG_RANGE is True K_CUT_DELTA: None DTYPE: float32 # float32 or float16 or bfloat16 + N_TARGETS: 1 + TARGET_INDEX_KEY: target_index RESIDUAL_FACTOR: 0.5 -FITTING_SCHEME: + +FITTING_SCHEME: INITIAL_LR: 1e-4 EPOCH_NUM_ATOMIC: 1000000000000000000 # structural version is called "EPOCH_NUM" SCHEDULER_STEP_SIZE_ATOMIC: 500000000 # structural version is called "SCHEDULER_STEP_SIZE" @@ -44,6 +47,7 @@ FITTING_SCHEME: RANDOM_SEED: 0 CUDA_DETERMINISTIC: False MODEL_TO_START_WITH: None + ALL_SPECIES_PATH: None # should be specified if model_to_start_with is not None; path to all_species file SUPPORT_MISSING_VALUES: False USE_WEIGHT_DECAY: False WEIGHT_DECAY: 0.0 @@ -58,7 +62,7 @@ MLIP_SETTINGS: # only used when fitting MLIP USE_ENERGIES: True USE_FORCES: True -GENERAL_TARGET_SETTINGS: # only used when fitting general target +GENERAL_TARGET_SETTINGS: # only used when fitting general target TARGET_TYPE: structural TARGET_AGGREGATION: sum # sum or mean; only used when TARGET_TYPE is structural TARGET_DIM: 42 diff --git a/example/h2_train.xyz b/example/h2_train.xyz new file mode 100644 index 0000000..4d8e454 --- /dev/null +++ b/example/h2_train.xyz @@ -0,0 +1,40 @@ +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-8.759742673137072 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 1.53208638 0.13098867 4.53832253 +H 0.76553186 0.00000000 0.00000000 -1.16199225 -1.58021080 0.33524214 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-3.7192079015352757 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 2.73044949 0.06874556 0.21296946 +H 1.00466482 0.00000000 0.00000000 3.11014793 0.53780466 -3.79237256 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=7.189273706327455 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 1.53916231 4.99280004 4.67277815 +H 0.90433764 0.00000000 0.00000000 4.82751479 -3.72742755 1.53408770 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=8.17870662429138 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 3.66308968 3.87160588 4.82455171 +H 0.95810929 0.00000000 0.00000000 -2.04872371 0.41517506 -2.14607990 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-5.993965811098398 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 3.96966993 2.27459901 2.29572060 +H 0.89272778 0.00000000 0.00000000 4.13658605 2.63264531 0.03607745 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=5.5484447205560645 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.03319915 3.52230195 3.02470110 +H 0.87884678 0.00000000 0.00000000 3.71634012 4.60398225 4.93817840 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-5.814588656353306 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 4.38672742 -3.38098568 3.96265227 +H 1.10390324 0.00000000 0.00000000 -2.36787831 1.26632275 -2.54980052 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=4.822978863120337 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.16551747 4.41462459 -2.12527669 +H 0.92116485 0.00000000 0.00000000 1.53299624 -4.04118132 -3.07972468 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=2.153278030275324 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.50090037 2.51211053 4.84955928 +H 1.15947263 0.00000000 0.00000000 -1.38685321 4.87367691 1.93581327 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-9.691070544370257 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -2.43225987 1.17215292 0.49919348 +H 1.05785635 0.00000000 0.00000000 0.84314954 -0.43226929 4.92230042 diff --git a/example/h2_val.xyz b/example/h2_val.xyz new file mode 100644 index 0000000..4d8e454 --- /dev/null +++ b/example/h2_val.xyz @@ -0,0 +1,40 @@ +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-8.759742673137072 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 1.53208638 0.13098867 4.53832253 +H 0.76553186 0.00000000 0.00000000 -1.16199225 -1.58021080 0.33524214 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-3.7192079015352757 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 2.73044949 0.06874556 0.21296946 +H 1.00466482 0.00000000 0.00000000 3.11014793 0.53780466 -3.79237256 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=7.189273706327455 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 1.53916231 4.99280004 4.67277815 +H 0.90433764 0.00000000 0.00000000 4.82751479 -3.72742755 1.53408770 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=8.17870662429138 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 3.66308968 3.87160588 4.82455171 +H 0.95810929 0.00000000 0.00000000 -2.04872371 0.41517506 -2.14607990 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-5.993965811098398 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 3.96966993 2.27459901 2.29572060 +H 0.89272778 0.00000000 0.00000000 4.13658605 2.63264531 0.03607745 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=5.5484447205560645 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.03319915 3.52230195 3.02470110 +H 0.87884678 0.00000000 0.00000000 3.71634012 4.60398225 4.93817840 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-5.814588656353306 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 4.38672742 -3.38098568 3.96265227 +H 1.10390324 0.00000000 0.00000000 -2.36787831 1.26632275 -2.54980052 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=4.822978863120337 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.16551747 4.41462459 -2.12527669 +H 0.92116485 0.00000000 0.00000000 1.53299624 -4.04118132 -3.07972468 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=2.153278030275324 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -1.50090037 2.51211053 4.84955928 +H 1.15947263 0.00000000 0.00000000 -1.38685321 4.87367691 1.93581327 +2 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-9.691070544370257 pbc="F F F" +H 0.00000000 0.00000000 0.00000000 -2.43225987 1.17215292 0.49919348 +H 1.05785635 0.00000000 0.00000000 0.84314954 -0.43226929 4.92230042 diff --git a/example/hypers_finetuning.yaml b/example/hypers_finetuning.yaml new file mode 100644 index 0000000..3d949fb --- /dev/null +++ b/example/hypers_finetuning.yaml @@ -0,0 +1,12 @@ +ARCHITECTURAL_HYPERS: + R_CUT: 100 + N_TRANS_LAYERS: 2 + N_GNN_LAYERS: 2 + +FITTING_SCHEME: + EPOCH_NUM: 10 + EPOCHS_WARMUP: 0 + MODEL_TO_START_WITH: results/pretraining/best_val_mae_both_model_state_dict + ALL_SPECIES_PATH: results/pretraining/all_species.npy +MLIP_SETTINGS: + USE_ENERGIES: True diff --git a/src/data_preparation.py b/src/data_preparation.py index 6ca593c..bfc141c 100644 --- a/src/data_preparation.py +++ b/src/data_preparation.py @@ -35,10 +35,12 @@ def get_pyg_graphs( USE_ADDITIONAL_SCALAR_ATTRIBUTES, USE_LONG_RANGE, K_CUT, + MULTI_TARGET, + TARGET_INDEX_KEY ): molecules = [ Molecule( - structure, R_CUT, USE_ADDITIONAL_SCALAR_ATTRIBUTES, USE_LONG_RANGE, K_CUT + structure, R_CUT, USE_ADDITIONAL_SCALAR_ATTRIBUTES, USE_LONG_RANGE, K_CUT, MULTI_TARGET, TARGET_INDEX_KEY ) for structure in tqdm(structures) ] diff --git a/src/estimate_error.py b/src/estimate_error.py index 9578da8..195cdb0 100644 --- a/src/estimate_error.py +++ b/src/estimate_error.py @@ -108,6 +108,8 @@ def main(): ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) if FITTING_SCHEME.MULTI_GPU: diff --git a/src/hypers.py b/src/hypers.py index 919779a..5a403eb 100644 --- a/src/hypers.py +++ b/src/hypers.py @@ -108,6 +108,13 @@ def combine_hypers(provided_hypers, default_hypers): raise ValueError( "if using balanced_data_loader only atomic batch size can be provided" ) + + if result["FITTING_SCHEME"]["MODEL_TO_START_WITH"] is not None: + if result["FITTING_SCHEME"]["ALL_SPECIES_PATH"] is None: + raise ValueError( + "if using model_to_start_with, all_species_path must be provided" + ) + return result diff --git a/src/molecule.py b/src/molecule.py index 36dffac..9c8156e 100644 --- a/src/molecule.py +++ b/src/molecule.py @@ -7,7 +7,7 @@ class Molecule: def __init__( - self, atoms, r_cut, use_additional_scalar_attributes, use_long_range, k_cut + self, atoms, r_cut, use_additional_scalar_attributes, use_long_range, k_cut, multi_target, target_index_key ): self.use_additional_scalar_attributes = use_additional_scalar_attributes @@ -75,6 +75,11 @@ def is_same(first, second): self.k_cut = k_cut self.volume = get_volume(self.cell[0], self.cell[1], self.cell[2]) + if multi_target: + self.target_index = int(self.atoms.info[target_index_key]) + else: + self.target_index = None + def get_max_num(self): maximum = None for chunk in self.relative_positions: @@ -151,6 +156,9 @@ def get_graph(self, max_num, all_species, max_num_k): "n_atoms": len(self.atoms.positions), } + if self.target_index is not None: + kwargs['target_id'] = self.target_index + if self.use_additional_scalar_attributes: kwargs["neighbor_scalar_attributes"] = torch.tensor( neighbor_scalar_attributes, dtype=torch.get_default_dtype() @@ -190,7 +198,7 @@ def get_graph(self, max_num, all_species, max_num_k): class MoleculeCPP: def __init__( - self, atoms, r_cut, use_additional_scalar_attributes, use_long_range, k_cut + self, atoms, r_cut, use_additional_scalar_attributes, use_long_range, k_cut, multi_target, target_index_key ): self.use_additional_scalar_attributes = use_additional_scalar_attributes @@ -203,7 +211,7 @@ def __init__( raise NotImplementedError("Long range is not implemented in cpp") if self.use_additional_scalar_attributes: raise NotImplementedError("Additional scalar attributes are not implemented in cpp") - + def is_3d_crystal(atoms): pbc = atoms.get_pbc() if isinstance(pbc, bool): @@ -227,9 +235,14 @@ def is_3d_crystal(atoms): else: self.max_num = torch.max(torch.bincount(self.i_list)) + if multi_target: + self.target_index = int(self.atoms.info[target_index_key]) + else: + self.target_index = None + def get_num_k(self): raise NotImplementedError("Long range is not implemented in cpp") - + def get_max_num(self): return self.max_num @@ -251,6 +264,9 @@ def get_graph(self, max_num, all_species, max_num_k): "n_atoms": len(self.atoms.positions), } + if self.target_index is not None: + kwargs['target_id'] = self.target_index + result = Data(**kwargs) return result @@ -266,6 +282,8 @@ def batch_to_dict(batch): "neighbors_index": batch.neighbors_index.transpose(0, 1), "neighbors_pos": batch.neighbors_pos, } + if hasattr(batch, 'target_id'): + batch_dict['target_id'] = batch.target_id if hasattr(batch, "neighbor_scalar_attributes"): batch_dict["neighbor_scalar_attributes"] = batch.neighbor_scalar_attributes diff --git a/src/pet.py b/src/pet.py index 12f8bff..2bd0051 100644 --- a/src/pet.py +++ b/src/pet.py @@ -145,7 +145,8 @@ def __init__( self.neighbor_embedder = NeverRun() # for torchscript if hypers.BLEND_NEIGHBOR_SPECIES and (not is_first): - self.neighbor_embedder = nn.Embedding(n_atomic_species + 1, d_model) + self.neighbor_embedder = nn.Embedding( + n_atomic_species + 1, d_model) self.add_central_token = add_central_token @@ -188,7 +189,8 @@ def forward(self, batch_dict: Dict[str, torch.Tensor]): x = batch_dict["x"] if self.USE_LENGTH: - neighbor_lengths = torch.sqrt(torch.sum(x**2, dim=2) + 1e-15)[:, :, None] + neighbor_lengths = torch.sqrt( + torch.sum(x**2, dim=2) + 1e-15)[:, :, None] else: neighbor_lengths = torch.empty( 0, device=x.device, dtype=x.dtype @@ -235,7 +237,8 @@ def forward(self, batch_dict: Dict[str, torch.Tensor]): coordinates = self.r_embedding(coordinates) if self.BLEND_NEIGHBOR_SPECIES and (not self.is_first): - tokens = torch.cat([coordinates, neighbor_embedding, input_messages], dim=2) + tokens = torch.cat( + [coordinates, neighbor_embedding, input_messages], dim=2) else: tokens = torch.cat([coordinates, input_messages], dim=2) @@ -256,13 +259,15 @@ def forward(self, batch_dict: Dict[str, torch.Tensor]): tokens = torch.cat([central_token[:, None, :], tokens], dim=1) - submask = torch.zeros(mask.shape[0], dtype=torch.bool).to(mask.device) + submask = torch.zeros( + mask.shape[0], dtype=torch.bool).to(mask.device) total_mask = torch.cat([submask[:, None], mask], dim=1) lengths = torch.sqrt(torch.sum(x * x, dim=2) + 1e-16) multipliers = cutoff_func(lengths, self.R_CUT, self.CUTOFF_DELTA) sub_multipliers = torch.ones(mask.shape[0], device=mask.device) - multipliers = torch.cat([sub_multipliers[:, None], multipliers], dim=1) + multipliers = torch.cat( + [sub_multipliers[:, None], multipliers], dim=1) multipliers[total_mask] = 0.0 multipliers = multipliers[:, None, :] @@ -270,7 +275,8 @@ def forward(self, batch_dict: Dict[str, torch.Tensor]): output_messages = self.trans( tokens[:, : (max_number + 1), :], - multipliers=multipliers[:, : (max_number + 1), : (max_number + 1)], + multipliers=multipliers[:, : ( + max_number + 1), : (max_number + 1)], ) if max_number < initial_n_tokens: padding = torch.zeros( @@ -330,9 +336,9 @@ def forward(self, batch_dict): return result -class Head(torch.nn.Module): +class FeedForward(torch.nn.Module): def __init__(self, hypers, n_in, n_neurons): - super(Head, self).__init__() + super(FeedForward, self).__init__() self.hypers = hypers self.nn = nn.Sequential( nn.Linear(n_in, n_neurons), @@ -342,9 +348,62 @@ def __init__(self, hypers, n_in, n_neurons): nn.Linear(n_neurons, hypers.D_OUTPUT), ) - def forward(self, batch_dict: Dict[str, torch.Tensor]): - pooled = batch_dict["pooled"] - outputs = self.nn(pooled) + def forward(self, x): + return self.nn(x) + + +class Head(torch.nn.Module): + def __init__(self, hypers, n_in, n_neurons): + super(Head, self).__init__() + self.n_targets = hypers.N_TARGETS + self.d_output = hypers.D_OUTPUT + self.hypers = hypers + if self.n_targets == 1: + self.model = FeedForward(hypers, n_in, n_neurons) + else: + self.models = nn.ModuleList( + [FeedForward(hypers, n_in, n_neurons) for _ in range(self.n_targets)] + ) + + def forward(self, batch: Dict[str, torch.Tensor]): + x = batch["pooled"] + if self.n_targets == 1: + return {"atomic_predictions": self.model(x)} + + target_indices = batch['target_indices'] + if target_indices is None: + raise ValueError("target indices should be provided for multitarget fitting") + + # Check if all target indices are within valid range + if torch.any(target_indices < 0) or torch.any(target_indices >= self.n_targets): + raise ValueError( + f"All target indices must be within 0 and {self.n_targets - 1} inclusive.") + + # Check if the first dimension of x matches the dimension of target_indices + if x.size(0) != target_indices.size(0): + raise ValueError( + "The first dimension of x and target_indices must match.") + + # Determine the shape for the output tensor, replacing the last dimension with d_output + output_shape = list(x.shape) + output_shape[-1] = self.d_output + outputs = torch.zeros(output_shape, device=x.device) + + for target_idx in range(self.n_targets): + # Create a mask for the current target index + mask = (target_indices == target_idx) + if mask.sum().item() == 0: + continue # Skip if no samples for the current target index + + # Select the inputs for the current target index + x_subtensor = x[mask] + + # Get the model output for the current target index + model_output = self.models[target_idx](x_subtensor) + + # Place the model output in the corresponding positions in the overall output tensor + outputs[mask] = model_output + return {"atomic_predictions": outputs} @@ -354,9 +413,9 @@ def __init__(self, hypers, head): self.head = head self.hypers = hypers - def forward(self, central_tokens: torch.Tensor, central_species: torch.Tensor): + def forward(self, central_tokens: torch.Tensor, central_species: torch.Tensor, target_indices: torch.Tensor): predictions = self.head( - {"pooled": central_tokens, "central_species": central_species} + {"pooled": central_tokens, 'target_indices' : target_indices} )["atomic_predictions"] return predictions @@ -374,6 +433,7 @@ def forward( nums: torch.Tensor, central_species: torch.Tensor, multipliers: torch.Tensor, + target_indices: torch.Tensor ): messages_proceed = messages * multipliers[:, :, None] messages_proceed[mask] = 0.0 @@ -383,7 +443,7 @@ def forward( else: pooled = messages_proceed.sum(dim=1) - predictions = self.head({"pooled": pooled, "central_species": central_species})[ + predictions = self.head({"pooled": pooled, 'target_indices' : target_indices})[ "atomic_predictions" ] return predictions @@ -402,9 +462,10 @@ def forward( nums: torch.Tensor, central_species: torch.Tensor, multipliers: torch.Tensor, + target_indices: torch.Tensor ): predictions = self.head( - {"pooled": messages, "central_species": central_species} + {"pooled": messages, "target_indices" : target_indices} )["atomic_predictions"] mask_expanded = mask[..., None].repeat(1, 1, predictions.shape[2]) @@ -437,7 +498,8 @@ def __init__(self, hypers, transformer_dropout, n_atomic_species): add_central_tokens.append(hypers.ADD_TOKEN_FIRST) add_central_tokens.append(hypers.ADD_TOKEN_SECOND) - self.embedding = nn.Embedding(n_atomic_species + 1, transformer_d_model) + self.embedding = nn.Embedding( + n_atomic_species + 1, transformer_d_model) gnn_layers = [] if transformers_central_specific: for layer_index in range(n_gnn_layers): @@ -523,7 +585,8 @@ def __init__(self, hypers, transformer_dropout, n_atomic_species): } else: for _ in range(n_gnn_layers): - bond_heads.append(Head(hypers, transformer_d_model, head_n_neurons)) + bond_heads.append( + Head(hypers, transformer_d_model, head_n_neurons)) self.bond_heads = torch.nn.ModuleList(bond_heads) self.messages_bonds_predictors = torch.nn.ModuleList( @@ -551,6 +614,12 @@ def get_predictions(self, batch_dict: Dict[str, torch.Tensor]): mask = batch_dict["mask"] nums = batch_dict["nums"] + if 'target_id' in batch_dict.keys(): + target_indices = batch_dict['target_id'] + target_indices = target_indices[batch] + else: + target_indices = None + #print(target_indices, type(target_indices[0])) lengths = torch.sqrt(torch.sum(x * x, dim=2) + 1e-16) multipliers = cutoff_func(lengths, self.R_CUT, self.CUTOFF_DELTA) multipliers[mask] = 0.0 @@ -579,6 +648,7 @@ def get_predictions(self, batch_dict: Dict[str, torch.Tensor]): output_messages = result["output_messages"] # batch_dict['input_messages'] = output_messages[neighbors_index, neighbors_pos] + new_input_messages = output_messages[neighbors_index, neighbors_pos] batch_dict["input_messages"] = self.RESIDUAL_FACTOR * ( batch_dict["input_messages"] + new_input_messages @@ -586,16 +656,16 @@ def get_predictions(self, batch_dict: Dict[str, torch.Tensor]): if "central_token" in result.keys(): atomic_predictions = atomic_predictions + central_tokens_predictor( - result["central_token"], central_species + result["central_token"], central_species, target_indices ) else: atomic_predictions = atomic_predictions + messages_predictor( - output_messages, mask, nums, central_species, multipliers + output_messages, mask, nums, central_species, multipliers, target_indices ) if self.USE_BOND_ENERGIES: atomic_predictions = atomic_predictions + messages_bonds_predictor( - output_messages, mask, nums, central_species, multipliers + output_messages, mask, nums, central_species, multipliers, target_indices ) if self.TARGET_TYPE == "structural": @@ -655,7 +725,8 @@ def __init__(self, model, use_energies, use_forces): self.use_energies = use_energies self.use_forces = use_forces if self.model.pet_model.hypers.D_OUTPUT != 1: - raise ValueError("D_OUTPUT should be 1 for MLIP; energy is a single scalar") + raise ValueError( + "D_OUTPUT should be 1 for MLIP; energy is a single scalar") if self.model.pet_model.hypers.TARGET_TYPE != "structural": raise ValueError("TARGET_TYPE should be structural for MLIP") if self.model.pet_model.hypers.TARGET_AGGREGATION != "sum": @@ -664,7 +735,8 @@ def __init__(self, model, use_energies, use_forces): def get_predictions(self, batch, augmentation): predictions = self.model(batch, augmentation=augmentation) if predictions.shape[-1] != 1: - raise ValueError("D_OUTPUT should be 1 for MLIP; energy is a single scalar") + raise ValueError( + "D_OUTPUT should be 1 for MLIP; energy is a single scalar") # if predictions.shape[0] != batch.num_graphs: # raise ValueError("model should return a single scalar per structure") return predictions[..., 0] @@ -721,7 +793,8 @@ def __init__(self, model, self_contributions): else: self.TARGET_TYPE = "atomic" if self.model.hypers.D_OUTPUT != 1: - raise ValueError("self contributions wrapper is made only for D_OUTPUT = 1") + raise ValueError( + "self contributions wrapper is made only for D_OUTPUT = 1") def forward(self, batch_dict: Dict[str, torch.Tensor]) -> torch.Tensor: predictions = self.model(batch_dict) diff --git a/src/single_struct_calculator.py b/src/single_struct_calculator.py index 6292d42..de7352d 100644 --- a/src/single_struct_calculator.py +++ b/src/single_struct_calculator.py @@ -80,6 +80,8 @@ def forward(self, structure): self.architectural_hypers.USE_ADDITIONAL_SCALAR_ATTRIBUTES, self.architectural_hypers.USE_LONG_RANGE, self.architectural_hypers.K_CUT, + self.architectural_hypers.N_TARGETS > 1, + self.architectural_hypers.TARGET_INDEX_KEY ) if self.architectural_hypers.USE_LONG_RANGE: raise NotImplementedError( diff --git a/src/train_model.py b/src/train_model.py index ed137ad..a26dad5 100644 --- a/src/train_model.py +++ b/src/train_model.py @@ -59,7 +59,10 @@ def fit_pet( adapt_hypers(FITTING_SCHEME, train_structures) structures = train_structures + val_structures - all_species = get_all_species(structures) + if FITTING_SCHEME.ALL_SPECIES_PATH is not None: + all_species = np.load(FITTING_SCHEME.ALL_SPECIES_PATH) + else: + all_species = get_all_species(structures) name_to_load, NAME_OF_CALCULATION = get_calc_names( os.listdir(output_dir), name_of_calculation @@ -80,6 +83,8 @@ def fit_pet( ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) val_graphs = get_pyg_graphs( val_structures, @@ -88,6 +93,8 @@ def fit_pet( ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) if MLIP_SETTINGS.USE_ENERGIES: diff --git a/src/train_model_general_target.py b/src/train_model_general_target.py index e2de5da..239f667 100644 --- a/src/train_model_general_target.py +++ b/src/train_model_general_target.py @@ -75,7 +75,10 @@ def main(): val_structures = ase.io.read(args.val_structures_path, index=":") structures = train_structures + val_structures - all_species = get_all_species(structures) + if FITTING_SCHEME.ALL_SPECIES_PATH is not None: + all_species = np.load(FITTING_SCHEME.ALL_SPECIES_PATH) + else: + all_species = get_all_species(structures) if "results" not in os.listdir("."): os.mkdir("results") @@ -99,6 +102,8 @@ def main(): ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) val_graphs = get_pyg_graphs( val_structures, @@ -107,6 +112,8 @@ def main(): ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) train_targets = get_targets(train_structures, GENERAL_TARGET_SETTINGS) diff --git a/src/zbl.py b/src/zbl.py new file mode 100644 index 0000000..f79dade --- /dev/null +++ b/src/zbl.py @@ -0,0 +1,100 @@ +#from typing import Dict, List, Optional + +import torch +import numpy as np + +def get_pairwise_zbl( zi, zj, rij) -> float: + """Ziegler-Biersack-Littmark (ZBL) potential.""" + + rc=1 #this is a hyperparameter + + rc = torch.tensor(rc).unsqueeze(-1) + r1 = 0.0 + p = 0.23 + # angstrom + a0 = 0.46850 + c = torch.tensor([0.02817, 0.28022, 0.50986, 0.18175]) + d = torch.tensor([0.20162, 0.40290, 0.94229, 3.19980]) + + a = a0 / (zi ** p + zj ** p) + + da = d.unsqueeze(-1)/a + + phi_x = _phi(rij,c,da) + + # e * e / (4 * pi * epsilon_0) / electron_volt / angstrom + factor=14.399645478425668 * zi * zj + e = _e_zbl(factor,rij,c,da) # eV.angstrom + + # switching function + ec = _e_zbl(factor, rc,c,da ) + dec = _dedr(factor, rc,c,da) + d2ec = _d2edr2(factor, rc,c,da) + + # coefficients are determined such that E(rc) = 0, E'(rc) = 0, and E''(rc) = 0 + A = (-3 * dec + ( rc- r1) * d2ec) / (( rc- r1) ** 2) + B = (2 * dec - ( rc- r1) * d2ec) / (( rc- r1) ** 3) + C = - ec + ( rc- r1) * dec / 2 - ( rc- r1) * ( rc- r1) * d2ec / 12 + + e += A / 3 * ((rij- r1) ** 3) + B / 4 * ((rij- r1) ** 4) + C + return e + +def _phi(r,c,da): + phi = torch.sum( c.unsqueeze(-1) * torch.exp(-r * da ),dim=0 ) + return phi + +def _dphi(r,c,da): + dphi = torch.sum(- c.unsqueeze(-1) * da * torch.exp(-r * da ),dim=0) + return dphi + +def _d2phi(r,c,da): + d2phi = torch.sum( c.unsqueeze(-1) * ( da ** 2) * torch.exp(- rc * da ),dim=0) + return d2phi + +def _e_zbl(factor, r,c,da): + phi = _phi(r,c,da) + ret = factor / r *phi + return ret + +def _dedr(factor,r,c,da): + phi = _phi(r,c,da) + dphi = _dphi(r,c,da) + ret = factor / r * (-phi / r + dphi) + return ret + +def _d2edr2(factor,r,c,da): + phi = _phi(r,c,da) + dphi = _dphi(r,c,da) + d2phi = _d2phi(r,c,da) + + ret = factor / r * (d2phi - 2 / r * dphi + 2 * phi / (r ** 2)) + return ret + + + +#rc=1 +#r=torch.linspace(0.1, rc, steps=100, requires_grad=True) +#print(r) +#zi=torch.ones(len(r))*10 +#zj=torch.ones(len(r))*10 +# +#energies=get_pairwise_zbl(zi, zj, r) +# +#import matplotlib.pyplot as plt +#fig,ax = plt.subplots(figsize=(6.75,6.75)) +#plt.plot(r.detach(), [e.detach() for e in energies],'o') +#energy=torch.sum(energies) +#energy.backward() +#plt.plot(r.detach(), r.grad.detach(), color='r',marker='d') +# +# +##ax.set_yscale('log') +# +##ax.set_ylim(1e-4, 1e4) +# +#plt.show() + + + + + diff --git a/tests/hypers_minimal_multi_target.yaml b/tests/hypers_minimal_multi_target.yaml new file mode 100644 index 0000000..b2449a6 --- /dev/null +++ b/tests/hypers_minimal_multi_target.yaml @@ -0,0 +1,14 @@ +ARCHITECTURAL_HYPERS: + R_CUT: 100 + N_TRANS_LAYERS: 2 + N_GNN_LAYERS: 2 + TRANSFORMER_D_MODEL: 32 + TRANSFORMER_N_HEAD: 4 + TRANSFORMER_DIM_FEEDFORWARD: 128 + HEAD_N_NEURONS: 32 + N_TARGETS: 10 + +FITTING_SCHEME: + EPOCH_NUM: 2 + EPOCHS_WARMUP: 0 + diff --git a/tests/methane_multi_target_10.xyz b/tests/methane_multi_target_10.xyz new file mode 100644 index 0000000..cc36864 --- /dev/null +++ b/tests/methane_multi_target_10.xyz @@ -0,0 +1,700 @@ +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.9387159119347 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.68394837 -2.15356108 -1.67031997 +H 0.65188762 -2.47673965 -0.99463084 -0.94452139 1.24271139 0.33776546 +H -1.26559026 2.42678658 -0.87840964 0.02561900 -1.39273378 -0.86477859 +H -1.04748427 -1.65605732 -0.77479263 1.94643498 1.41872096 0.63375921 +H -1.65948386 0.67035258 -2.06183109 0.65624918 0.88497153 1.56368753 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.581515499188 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.93374847 -1.82992744 0.86945080 +H -0.81430179 2.62812250 0.08592717 0.44691295 -0.77217976 0.20698470 +H 0.94879319 -1.34487605 0.73222902 -1.56106398 2.71672343 -1.02342447 +H -2.22795248 0.49013783 0.31816886 0.59649054 -4.53315463 -1.24355882 +H -2.31145423 1.13969469 0.49494826 -0.41606998 4.41885156 1.19049586 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.052435786737 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -6.77120220 -3.69330187 -5.05784812 +H 0.70245349 0.23019167 0.78061111 -0.59782957 -6.28939371 -4.05399489 +H -1.90102469 1.09895182 1.78472811 0.87456730 -0.66272013 -0.70565398 +H -1.56657802 -0.18557901 -1.28236448 1.16138376 1.27539424 0.72365891 +H 0.94909235 0.58672318 1.19747433 5.33300718 9.37014951 9.09386893 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.245749575956 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.09443872 -0.73477790 -0.55429101 +H -1.08023801 1.56471519 0.19382609 1.03055209 -2.79605177 -0.11629156 +H -0.72920010 -2.05475822 -1.30242770 0.49295886 1.25899368 0.34198207 +H 0.34561183 -0.34949838 -2.28852487 -0.73307326 -0.47226712 2.26080133 +H 0.07974078 -1.47187449 0.82723900 -0.88473345 2.74423887 -1.93222500 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.9988456335902 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -13.73016084 -12.63452433 -7.49401213 +H 0.57588323 0.45631905 0.40184653 14.23921944 11.68468230 9.78744129 +H -0.29379143 0.40077461 -0.92983236 -0.32790579 0.96690440 -2.20237196 +H 2.80065112 -0.17896730 1.03447091 -0.59873563 0.41158238 -3.45798617 +H 2.55127316 0.07273124 -0.52513029 0.41761985 -0.42875838 3.36667392 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.087576583752 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.14693998 -1.45874123 -0.29853915 +H -0.26140281 2.16869040 1.72032482 -0.08324516 -0.79216495 -0.83129767 +H -1.18945133 -0.73221894 -0.58793940 2.48145093 2.02492154 1.17731535 +H 1.91760284 -0.60642223 -1.14699045 0.62791767 4.17630592 0.00512575 +H 2.22052828 0.66705484 -1.17466407 -0.87899474 -3.95028631 -0.05256314 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.3558784015984 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.79895061 -3.36199296 -0.36110800 +H 1.02065032 1.12920105 1.88486558 -2.88938543 -0.96409881 1.75735545 +H 0.24755657 0.89755709 2.40143680 2.75086050 0.78678466 -1.87284432 +H -2.80142767 -0.52366587 -0.82355394 1.09289674 0.22541437 0.38608114 +H 0.10463450 -1.87740786 0.01359383 -0.15555232 3.31364489 0.09032907 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.923103403618 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 24.88193806 -13.41383942 -39.88153383 +H 2.01456676 -1.53991113 -0.65853075 -2.76020749 -0.07733573 -3.29421146 +H 1.01622534 -1.45108597 -1.53917180 3.83637199 -0.33882527 2.77087603 +H -0.37387591 0.14930613 0.58427124 -25.25630627 10.21480870 40.57347868 +H 0.14524808 -1.84211069 0.24322222 -0.70206163 3.61569308 -0.16840939 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.5027556819905 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.88499998 -2.41840694 4.89543763 +H -1.50543316 0.49880150 -2.28149982 0.72670412 -3.29556334 1.81475844 +H 1.78944524 1.37540926 0.50216093 -1.65479513 -1.32763959 -0.37012486 +H -1.20294043 -0.59154752 -1.55713554 -0.94855546 3.14806217 -1.83619117 +H -0.04007745 0.58999880 -0.80259299 -0.00859212 3.89365260 -4.50370675 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.896596202102 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.00864422 0.79020628 1.17098118 +H -1.63523722 1.62049787 0.71864776 1.52118872 -1.24475593 -0.44264286 +H 1.77450518 -0.40213367 1.24034414 -1.51964863 0.59532943 -1.55077751 +H 2.10051342 0.86866577 -1.68054832 0.58113077 -1.67977906 2.48976125 +H 2.57247260 0.03680146 -0.42823752 -1.59133513 1.53895968 -1.66713334 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.7490211675888 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 3.23036014 2.92888119 -1.45785728 +H 1.11009312 0.66352881 -1.20647303 -2.10089921 -1.57885294 2.36105743 +H 1.16343518 -0.99357315 2.24678554 0.10767579 1.44465980 -3.68581892 +H 0.89954596 2.26221256 0.66328548 -0.74154145 -1.63032387 -0.35730534 +H 1.17776041 -0.54234298 1.16095099 -0.49556853 -1.16436315 3.13991640 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.3938554326242 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.45688129 -0.04993239 -0.46814616 +H -1.83401146 -2.13793502 0.29419671 3.13332152 -1.15300864 -0.73749299 +H -0.37607822 -2.69332823 -0.06510783 -3.09770041 1.61236008 0.82285879 +H 2.11757195 1.83324438 0.88708876 -0.80343359 -0.42749134 -0.15603158 +H -1.26530038 0.18387931 -0.17063378 2.22474159 0.01791700 0.53871989 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.6028743192574 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.31260052 -1.24277926 2.53257734 +H 1.99444931 -0.53130477 -0.66877749 -0.49403564 -0.79746760 -3.93913852 +H -2.35844699 1.03685663 0.42292372 1.30283152 -0.76157909 -0.09243326 +H 1.99279026 -0.81977796 -1.97176363 0.18794670 0.78290229 3.85471631 +H 0.41000952 -0.86627710 1.09472954 -1.30943463 2.01896120 -2.35575478 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.4061932532993 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.62040318 -2.72410456 2.65294102 +H 2.57191792 0.28766242 0.88009832 -1.76659394 -0.43541549 -0.53546641 +H 0.88351806 0.74378011 0.90635221 -0.88271307 -1.66745525 -1.28226114 +H 1.81653990 -1.79186652 -0.53365636 -0.44399680 1.28403263 0.26991350 +H -0.23389602 -1.52228126 0.75367570 0.47300863 3.54341214 -1.10512182 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.2772190682722 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.46397445 1.34066995 -2.41457856 +H 0.20250772 0.56422297 -1.76003284 -0.21627204 -0.83090995 3.28050233 +H 0.84327328 1.26067880 1.02266774 0.59327718 -2.15777872 -0.52778241 +H 2.34240731 0.56554026 1.74411603 -1.65237983 0.66731110 -0.95213700 +H 0.58767485 -2.44104149 -1.29577854 -0.18854422 0.98075185 0.61370100 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.7193620131502 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.42479785 1.38239640 2.37223402 +H -1.20973077 0.23068730 2.67952802 1.34938085 0.64413979 -1.14207991 +H 0.21903583 1.18029513 1.89069871 -0.52530181 -1.60821649 -0.33867203 +H 2.28436944 0.71936123 1.20812265 -1.65596601 0.13138549 -0.26835130 +H -1.97745500 1.39711861 1.03779045 1.25677687 -0.54983117 -0.62293589 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.0063519751423 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 4.08562307 -0.49703869 -0.93521605 +H 0.75232455 -2.67672964 -1.01446344 -0.16055621 1.14843311 1.81754706 +H 1.65245179 0.45521477 0.01744103 -3.51289365 -1.01389184 -0.01126298 +H 0.63924872 -0.87413137 -2.64750787 -0.24367744 -0.06620079 1.32088530 +H 0.72424320 -2.45278336 0.83773921 -0.16843664 0.42876198 -2.19210039 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.5516568848795 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.04943187 2.52644937 -1.41836152 +H -2.51095677 -1.48518289 0.28371437 0.12589207 2.55860206 1.41660083 +H -0.45314678 1.49270562 -0.45879848 0.90159115 -3.42896406 0.91142357 +H -1.50223812 -1.64441416 -1.90452149 0.41891414 0.65343382 0.95974439 +H -2.68780133 -0.19038830 1.30782638 0.60292293 -2.30947079 -1.86939132 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.9771205593252 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.73486635 1.63510201 -1.37240200 +H -0.54405504 1.45630179 -2.38715021 -0.09937061 -1.05621428 1.12903875 +H -0.65699807 1.77905062 1.48965088 0.77416156 -1.27611363 -1.28646541 +H 1.30427899 0.05344825 -1.79309927 -1.48131295 0.55653815 1.50308455 +H -2.39367554 0.42066401 -1.24500175 1.54144234 0.14082195 0.02678268 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.7037725411224 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 4.06025142 -2.47218570 -3.84121801 +H -0.54281651 -2.43581359 -0.97054775 0.06660291 1.45043810 0.55402156 +H -0.50530083 0.46496172 0.80461750 -1.33941473 1.13931031 1.83070289 +H 0.56453871 1.25621550 -1.75488843 -0.76030845 -1.39398334 2.16521693 +H 1.92200027 -1.00808346 0.76833744 -2.02690026 1.27632343 -0.70859892 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.5483640853893 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.18755435 25.91357824 -13.26766803 +H -0.01254978 -0.75966175 0.29877931 -1.17420534 -22.63334639 9.01163062 +H 2.11666291 0.31107492 -0.87953814 -2.43443058 -0.29048336 0.98305351 +H -1.24005165 1.56252985 -0.29187300 2.18046718 -2.73929567 1.00329427 +H -1.08770594 -0.12558410 -1.79427936 1.61584547 -0.25080146 2.26983516 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.1848153776712 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.57503725 0.69634452 0.15891739 +H -2.85959993 0.62540719 0.59491030 0.28801922 -2.46118086 -2.14470877 +H 0.97043701 -0.63755393 -1.71654327 -0.87610534 1.42726525 1.98284233 +H -2.70792311 -0.68530181 -0.50196041 -0.06731922 2.60728797 2.15669423 +H 0.21194079 1.20717842 0.64352827 0.08027862 -2.26969272 -2.15383105 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.1945543824602 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.81885884 1.46313370 -1.78416693 +H 1.21025620 1.65063519 -1.56407664 -2.42463158 -0.81704964 1.49604538 +H -0.47810021 1.56012681 -2.35558575 0.62478040 -0.23772173 0.25924548 +H 0.53959415 1.51234295 -0.80964865 1.15483001 -0.69929049 -0.32549358 +H 2.62851804 -0.67528787 -0.90046646 -1.17381505 0.29076516 0.35439279 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.3690939473215 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.85389974 -0.62061007 0.14593280 +H 0.16241453 1.64876188 0.72232106 2.34947717 -1.52552772 -1.99199957 +H 1.05974382 -1.36303511 -0.69811958 -1.22585420 2.48414236 1.43229176 +H -0.53293409 -0.73818298 2.70949192 0.37569953 0.35943113 -1.12870605 +H 1.30645321 1.69351956 -0.10207302 -2.35316825 -0.69740896 1.54246770 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1089.987080848048 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.15825610 1.69326194 -5.72830676 +H -0.89425208 -0.10505124 -1.28482176 -0.28102530 0.16960958 1.17504198 +H 0.48124342 0.87950437 -1.36038601 0.76554785 -0.84789055 2.03548363 +H 1.28999419 -0.27618594 -1.47405610 -2.30025184 0.87417289 1.39872908 +H -1.21519454 0.92047550 -1.40976337 1.65759249 -1.88929938 1.11888495 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.5828081054747 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.21732259 -0.46399485 1.87260932 +H -1.54301910 1.32168078 1.79082259 2.66185246 -0.73408782 -0.17475899 +H -1.41923583 -0.02615248 -1.17403188 1.97721161 -0.51397558 2.38652730 +H 0.11669264 1.03883063 1.83452043 -2.71093022 0.06270358 -1.41895596 +H 0.44159130 -1.13831095 1.12938836 -1.71088171 1.64911659 -2.66512754 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.3166339808051 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.65987238 -0.30138948 -0.80965669 +H 2.24063661 0.45368711 0.77582875 -1.61946970 -0.62890548 -0.58384482 +H -2.27986510 -1.30032306 0.05887936 0.56358195 3.11843071 0.39115855 +H -1.06183961 -1.22065234 -1.42963868 1.05893399 0.82641103 1.73337116 +H -2.21117845 0.04504652 0.47652941 0.65694646 -3.01452724 -0.73101226 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.7138715550834 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.35879829 -1.58667115 2.53483374 +H 1.60820275 -1.25401440 0.07180807 -0.48703812 -2.69162482 1.47596763 +H -0.26891987 2.22172999 1.62642576 0.07589951 -1.16106494 -0.72827918 +H 1.43377407 -2.43133778 0.90941621 0.90566378 2.49620187 -1.90959877 +H 0.34416607 -1.07814441 0.83786358 -1.85344276 2.94318938 -1.37303346 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.2570458461087 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.46546090 -0.22138751 -2.68254008 +H -1.16307934 -0.85931173 -1.37815099 1.67809036 1.36098321 1.12087395 +H 2.73348600 -0.32463193 0.24974948 -1.16783466 0.03817164 -0.02926894 +H -0.12148390 0.34540703 -1.77045764 -0.13439934 -1.35317940 2.45513208 +H 0.53510563 -1.23731399 2.47523446 0.08968629 0.17534469 -0.86434356 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.0478417422673 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.15169327 2.23410144 -1.35980513 +H -0.06706075 -1.53569784 0.47446464 -0.11392923 4.46771026 -1.10198302 +H 1.07448216 1.18253587 -0.46634133 -1.17263440 -3.11614243 2.17598163 +H -0.99431303 1.39666745 -0.17768953 1.13687188 -4.04112754 0.43960690 +H -1.62372625 -0.57246107 1.48618671 1.30122664 0.45519242 -0.15385745 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.4348086803993 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.86409690 -1.02553689 2.08624443 +H 0.54108295 -0.58936501 -1.02139241 0.84247992 -0.02233056 -1.13980911 +H 0.87077515 -0.90568553 1.69473278 -1.17214229 1.00402549 -2.40482277 +H 0.40777177 -1.34611784 -1.38746389 -0.61166880 -0.22851667 0.83136298 +H 2.55403472 -0.08248802 -1.33068464 -0.92259450 0.27234371 0.62692111 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1090.2197696599553 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.48554739 5.52998668 -9.68536022 +H 0.78309865 2.27986236 0.77955686 -1.07542248 -0.94916481 4.35833239 +H 0.52987729 2.07092912 1.89753793 0.99559638 0.96505269 -4.20916566 +H -0.16698327 -0.66454131 0.62434872 -1.49077564 -7.80886442 8.47932512 +H -1.17524444 -1.06436562 -0.77600579 2.05612291 2.26321097 1.05700515 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.4447883726739 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -7.91461548 12.96470915 0.54678287 +H 0.42933963 -0.78413255 0.10434662 9.03944996 -12.83072582 0.34884898 +H 0.08193948 -1.83147271 0.74541627 -0.61543855 1.29196140 0.32910341 +H 0.30713396 1.16865177 2.18533481 0.04390006 -0.63500826 -1.66598406 +H 1.86695350 2.10527694 0.16522374 -0.55325588 -0.79088557 0.44132183 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.1779609003956 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -18.57568408 11.92145324 -10.47708860 +H 0.11456914 -1.43774557 0.85097754 -1.75514070 0.85993772 -0.58488766 +H -2.08786554 0.09324909 -1.98771589 0.86034241 -0.43518769 0.41687577 +H 0.57204223 -0.45317030 0.39264479 18.21906522 -11.18890191 10.37237215 +H -1.70694410 1.78608398 0.46394964 1.25123768 -1.15738312 0.27275046 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.3258530730793 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.65734344 -3.27300962 0.25425445 +H -2.21146885 -0.19870641 1.26442267 1.59754949 1.29907771 0.27599108 +H -1.02275120 1.22392257 1.96528371 -0.80452374 -1.86616047 -1.37991528 +H 0.14506126 -1.81271897 0.34172918 -0.34301720 3.33042700 -0.38947499 +H -0.75425350 -0.89314680 -2.46682586 0.20744235 0.50972914 1.23907173 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.2308560061758 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.50347570 -0.60747944 -1.12027077 +H -1.66383334 -1.18856941 1.07717517 1.10224630 0.99442344 -1.87540976 +H -2.13935289 -1.08961492 -1.14137885 0.92925160 0.35407500 1.10179224 +H 1.35089362 -1.12435859 -0.49121736 -2.65365013 2.01951245 0.34577239 +H -0.65795333 1.30715422 -1.08256276 1.12552971 -2.76043889 1.54811384 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.238991069939 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.68457417 -2.40904298 -0.66237561 +H 1.35388670 0.21343476 2.53184271 -0.71427335 1.49288601 -2.70624515 +H 1.09003193 0.89056135 1.29415702 0.64560172 -1.62186545 3.41893933 +H -2.01040388 0.03997205 -1.90829699 0.75108385 0.26955406 0.79744651 +H 0.69164630 0.82598061 0.27870900 1.00219178 2.26828581 -0.84795432 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.5219674346806 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -3.32568794 4.90433570 -2.16669428 +H -1.13253293 1.24648599 0.22417780 1.12538058 -2.51377228 -0.04713914 +H -2.20479269 -1.32734263 -0.76491355 0.42617185 2.56262275 0.51618776 +H -2.25406951 0.28893090 -0.36849073 1.38571004 -2.01454559 -0.03111705 +H 0.00245953 1.27028523 -1.09719383 0.38816116 -2.93869304 1.72864136 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.7115663104787 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.68795655 -0.90376990 1.81311808 +H -0.77851926 0.27120175 2.26145448 0.60712566 0.21602727 -1.70048211 +H 0.63001314 2.31757670 0.46682405 -0.29209750 -1.25430398 -0.34431972 +H 1.25526573 -1.27424534 0.66955902 -1.50130329 2.34119102 -1.22814042 +H -0.24333585 1.35829434 -2.04955937 0.49833607 -0.39909298 1.45976401 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.4320186320374 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.48351398 -0.00394202 2.82757814 +H -2.74408628 -0.88276173 -0.15962935 1.51063331 1.15964826 -2.47189465 +H -1.85591007 -0.21261816 -1.51847170 -1.51015303 -1.36903900 2.53268584 +H 0.58687594 -0.07286701 1.25886898 -2.71541885 0.86781455 -0.07902341 +H 1.17007458 -0.35950304 0.49957416 0.23153154 -0.65445043 -2.80926005 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.726747595923 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.26354916 1.83554736 2.86997770 +H 2.05134600 0.58556603 -0.98196529 -0.61948959 -0.71421832 0.83253746 +H -0.38419909 0.66717055 1.45514095 1.42072128 -0.28135903 -1.62775225 +H 1.05502774 1.53723982 1.77279719 -1.56342168 -1.37148515 -1.09504772 +H -1.25808832 -0.81689975 1.23742594 2.02567333 0.53176556 -0.97985094 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.7726364513344 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.59963192 0.48828202 -1.01325164 +H 1.90566631 -0.37003298 -0.77007302 -2.34629106 0.81194548 0.26466279 +H -0.05044963 2.98125681 0.10663119 0.28284307 -1.28345259 -0.57175086 +H 0.87970310 1.44189636 -1.54388067 -0.51294199 -0.77474058 1.29772016 +H -2.04452121 -0.80463468 -0.50606543 1.97674007 0.75776100 0.02258355 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.2429593381744 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.83716202 -0.13610192 0.44798716 +H -1.23023517 0.54387930 1.13537078 2.06288852 -1.70938225 -1.95224053 +H -0.18863875 -1.85187065 -1.11457837 0.62525194 1.46713383 2.10081539 +H -1.37934107 -0.87651165 -0.90279357 -1.76391897 -1.34818220 -2.58873694 +H -1.92058880 -1.24928733 -1.62911353 0.91305930 1.72667395 1.99207002 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.2920623312434 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.94756180 2.40858018 2.22937009 +H -0.11162499 2.04300023 -0.04536080 0.73079783 -2.64770008 0.25897500 +H -1.13546626 -0.04345551 1.08163044 2.83371947 0.11290079 -2.03954495 +H 1.42376498 1.45274021 -2.15161256 0.78914236 0.21173918 1.32970162 +H 1.49540807 1.54701796 -0.13262296 -1.40588241 -0.08521822 -1.77856449 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.3768599703985 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.90423682 -2.70849435 -0.88425728 +H 0.97364099 -1.16853349 2.48075265 -1.34990432 -0.17810451 -1.53321223 +H -0.51582617 -1.83057771 1.19251708 1.10164261 1.28081618 0.08034341 +H -1.97163913 1.93737030 -0.52937961 0.65019731 -0.89124091 0.31529452 +H -0.33511210 -1.46221376 -0.90432673 0.50213976 2.49684259 2.02162075 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.0571890629546 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.43643004 1.64414819 0.44081789 +H 0.62816171 0.58529674 2.73578625 -0.35252051 -0.22218301 -1.25305134 +H -2.24638658 0.33274139 0.00165413 -0.77815860 0.44166841 2.36316625 +H -1.96161407 0.20963990 -0.64687654 1.22908453 -0.41366857 -2.22265694 +H 0.77835204 2.32134383 -1.02481370 -0.53474547 -1.45002004 0.67176991 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.9056855262409 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.01422283 1.96068301 -0.57465621 +H -0.32236725 -0.72707128 2.26491275 2.34687727 2.33132004 0.03057814 +H 1.82621158 1.28014942 -0.58005354 -1.89887212 -1.14184902 0.67030026 +H -0.92885953 0.83076943 -0.31334175 1.87324027 -1.20088260 0.77250063 +H 0.84908678 0.34489377 2.64243020 -2.30710949 -1.94944214 -0.89876036 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.1638633463783 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.41421433 0.76794258 -1.27647513 +H 2.05373795 -0.17058197 0.00572424 -0.03215474 0.39517256 -0.20621285 +H 2.08569083 0.75272957 0.06581647 -1.19371231 -1.21194247 0.01935630 +H -0.87228076 1.28900692 -2.11259133 0.64085752 -0.88607814 1.31092484 +H 2.38694135 -1.63425032 -0.32501100 -0.82917960 0.93478205 0.15232405 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.3184669278337 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 4.45840903 -0.60092158 0.29864508 +H 1.99656631 -0.26285685 -2.19093794 1.09522822 1.79043785 3.32122142 +H 2.31193334 0.27087003 -1.05536432 -1.10975958 -1.68481740 -3.47442736 +H 1.38841573 -0.55414463 -0.17670849 -3.48323339 1.09229716 0.63218364 +H 1.94697196 1.36172533 1.48403870 -0.96018405 -0.59678365 -0.77762587 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.8339434840852 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.66280155 -0.21601647 1.82284251 +H 1.72021012 0.39863710 1.69818368 -2.87402616 0.75544855 -1.21369596 +H 0.22661917 -1.86279344 2.05511492 -0.00496275 0.86024831 -1.04720821 +H 0.63591543 0.89485811 1.32847439 1.83181618 -1.58251059 -0.53625111 +H 1.70839026 -0.48285602 -2.36379494 -0.61566018 0.18257463 0.97408806 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1090.2180935743836 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -3.64200936 -0.74863718 2.89345086 +H -1.78166946 1.24931886 -0.12259101 1.95852791 -1.66413287 0.10134985 +H -0.06883846 0.44278034 1.48877662 0.14823599 -1.95538962 -3.99766971 +H -0.70288977 -1.38107566 1.19183849 0.56624767 1.80468897 -1.33693053 +H -0.44505250 -1.07358307 -0.68373981 0.96900036 2.56359771 2.33986587 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1078.02256294958 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 5.50956440 -55.66204237 -8.46028764 +H -1.19906966 1.70340040 1.32261558 0.29993526 -1.17778175 -0.27944304 +H 2.02456372 -0.83576977 1.54386382 -0.06722872 2.26928289 -1.16568059 +H -0.07366063 0.66812148 0.12500433 -4.88581553 56.75973628 9.20425775 +H 2.41947198 0.90288308 0.80405531 -0.85646930 -2.18891017 0.70112523 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.2031296647 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.14594907 -2.51104486 2.98807212 +H 2.01139105 -1.49880821 0.34428525 -1.30567310 1.04546398 -0.44831163 +H 0.80203727 -0.06219142 2.21843196 2.22268059 3.06763495 -0.23856300 +H 0.12784732 -0.73038629 1.12432364 -0.68676356 1.30990103 -2.10616329 +H 1.63102406 0.98431884 2.26834468 -2.37622180 -2.91188567 -0.19530571 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.7348393584189 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.00237124 1.71157488 1.32324403 +H -1.30235092 0.28705502 1.49402142 2.64069073 -0.58446137 -2.33238087 +H 1.88936381 0.16691023 1.01343016 -1.70773417 0.13370462 -0.97449121 +H -0.81468397 2.23698275 -1.35723375 0.55395985 -1.11328148 0.81574815 +H 1.02958543 -0.11717140 -0.56050110 -0.48432509 -0.14740655 1.16787991 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1089.941676129319 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.01908821 1.45366895 0.24087699 +H 0.14380866 -2.41759442 -1.02952311 3.12289209 0.90313896 -1.96573986 +H 0.27977902 1.25480214 -0.14427124 -0.22798599 -2.38585984 0.16213847 +H 2.24634543 -0.93855509 0.38009409 -1.75635684 0.96700467 -0.26373565 +H 0.96004442 -2.19227237 -1.51179402 -3.15738963 -0.93772545 1.82631093 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.252131778435 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -16.06117492 -10.17141052 -0.61787082 +H 0.73031765 0.44858180 -0.05029734 16.16074556 10.44060565 -1.11769195 +H -0.82986469 0.35808114 -2.24979933 0.67804546 0.07588512 1.50381320 +H 1.57773007 -1.07872963 -1.37025528 -1.36864305 0.82936986 0.60793144 +H -1.25494562 2.32758909 -0.28818960 0.59104083 -1.17437143 -0.37600498 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.3454825696663 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.69862474 7.70583410 -0.40116632 +H 0.94794316 -1.82627051 -1.11426306 -0.31907867 1.14833746 0.52459321 +H -0.00492342 -0.82715200 -0.52575819 -0.41743318 -8.57258730 -3.13519225 +H 0.06197927 0.41033010 -1.50946422 -0.01207545 0.10642726 3.40325713 +H 2.67481200 0.86598233 0.96637381 -0.94994694 -0.38766134 -0.39197205 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.7250993737646 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.06258685 0.27203672 -1.88261605 +H 2.22305567 -0.05791532 -0.52621487 -2.23863738 0.20241173 0.18593352 +H -1.42371233 0.52105319 -1.38150868 2.23183321 -0.64383332 1.60544844 +H -0.14258913 -2.22896156 -0.91935820 -16.34747766 4.48541591 2.86556209 +H 0.37474093 -2.37060014 -1.00939505 16.29158494 -4.31595957 -2.77449820 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.333095643225 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.83618500 1.10976730 -0.40363767 +H -1.22952511 -2.17988199 1.29654418 3.60470727 -0.51464715 0.14658328 +H 1.53373120 0.65621870 -0.30400869 -3.14964340 -1.31078086 0.07706577 +H 0.35354489 -2.40667491 1.40482059 -3.57780940 0.59971934 -0.29820593 +H -2.19459227 -0.08291064 -1.41624342 1.28649164 0.11626945 0.47826191 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.6055240821727 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.63632929 -2.78651811 -0.41632607 +H -1.75993906 -1.38336899 -1.65016299 0.90845497 0.78076982 0.82458760 +H -0.28553637 1.50188492 -0.29541765 -0.30029624 0.16788951 0.13194290 +H -0.37425284 -2.08114614 0.96419193 0.10095287 1.94892998 -0.62475161 +H -0.70339792 2.13863623 0.01964274 -0.07270106 -0.11091795 0.08472611 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.0839246241435 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.25916028 2.36733864 0.28544863 +H -1.35039769 1.35123523 -0.24161447 2.41432968 -1.99233279 0.18637884 +H 1.33106613 -0.57101076 -1.68363386 -1.01146986 0.83969027 1.96934712 +H 2.58827541 0.44358482 0.17801130 -1.69582276 0.00708288 -0.01792934 +H 1.05594736 0.57056141 1.09039095 -0.96625957 -1.22174866 -2.42344373 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.991190095131 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -9.80355234 6.82035606 -8.70468756 +H -1.16080387 1.76619475 0.21758351 1.39704552 -0.30918866 0.22638368 +H -0.12873987 1.33871609 -0.54660229 -0.71958833 -2.83200198 1.98602638 +H -2.31624154 -0.78556067 1.52484740 1.13685388 0.48068389 -0.80598772 +H 0.65101389 -0.46424409 0.45923200 7.98923870 -4.15966882 7.29837115 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.3445592281832 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.08237132 2.69177292 1.85823839 +H 0.68557849 1.32966875 1.85492804 -0.51563446 -1.06068337 -1.77466156 +H -2.18854483 -0.89803876 0.85684400 1.51085854 -1.75299126 -2.28343682 +H -1.47300515 -1.84167925 -0.36430858 -1.34303228 1.63938033 2.09356539 +H 1.63808201 1.28108397 -0.02517689 -1.73464283 -1.51748222 0.10636093 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.6978410012293 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.90037348 0.06867060 -0.66558434 +H -1.64481612 -0.11271665 2.08117149 2.04776271 -2.80153285 -1.40389443 +H 0.40219007 0.69740190 2.48895519 -0.47846914 0.07111006 -1.15583326 +H -0.62792998 0.58972700 -1.82864539 0.72090165 -0.50443318 2.66558108 +H -1.08931415 -1.18253526 1.57700175 -1.38976261 3.16642654 0.55966667 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.9761029558172 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -3.97035070 -19.55621224 12.34398338 +H 0.13427194 0.71281226 -0.40855205 4.31585055 18.93433976 -11.88555651 +H 2.40818298 0.65078211 1.31245519 -0.06571691 0.11477975 -0.07212873 +H 1.77860290 0.25244044 1.08745019 -0.25664352 -0.22647264 -0.04485651 +H 0.83900534 -2.71739321 0.31128830 -0.02303555 0.73358183 -0.34132181 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.8132034428002 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 4.54101758 1.11895077 -0.77353473 +H -1.39006345 -0.84939670 1.98528013 0.71593685 -0.83894054 -0.92911225 +H -0.41640667 -2.40922145 0.64721688 -0.44700654 1.56279485 1.02827049 +H 1.52478295 -0.10581506 0.09505549 -2.83428512 -0.44084874 -0.40859938 +H 1.01968105 1.19183486 -0.24391815 -1.97597594 -1.40200107 1.08303244 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.750113752769 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.24113238 -1.41515432 1.68487859 +H 0.73249914 -0.54797016 1.81120390 0.89033177 2.37989642 1.99182937 +H 1.20562802 -0.55601159 0.41137448 -1.71541611 2.59956438 -2.70472306 +H -1.36149129 2.02311501 1.29616456 0.84204797 -0.68313007 -0.43418496 +H 0.40242372 -1.09755805 1.51682055 -2.25830787 -2.88111675 -0.53783131 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.3029387753254 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.12285884 0.97868211 -0.29831598 +H -0.57937523 1.61942378 -1.75248957 0.38564662 -1.41789564 1.23189886 +H 1.24558806 -2.28715969 1.05097254 -2.03004780 -0.04672416 -1.87722291 +H -0.16932475 -2.47482519 -0.15429104 1.77671227 0.59142701 1.64214118 +H -2.47824030 0.05433023 1.49853607 0.99047011 -0.10538597 -0.69840449 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.0162347010134 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.11497670 -0.12741159 -4.43916277 +H -0.53323947 -0.90199647 -1.06923772 0.96790199 2.23137504 1.90411614 +H -1.64218982 0.88101201 -0.90794968 2.14391533 0.01193815 0.74826592 +H 1.40648361 0.09567317 -1.24565354 -2.30853388 -0.02694877 1.83416565 +H -0.18503747 2.40627709 -0.65422138 -0.68806248 -2.08906802 -0.04725844 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.4429301228738 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.60498718 -0.60074675 -0.93247886 +H -1.63948158 0.53852335 1.43739800 -2.32862912 1.74310691 -2.65523598 +H 0.93394606 -1.25223216 2.45748136 -0.32418591 0.49894387 -1.02906804 +H -2.53698178 1.18474562 0.55464096 2.42227234 -1.76518241 2.54511096 +H 1.27621887 -0.16211103 -1.73119645 -1.37451802 0.12389689 2.07171049 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.9881042057348 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.15586736 1.60219805 4.26479459 +H 1.94652763 -1.11488651 1.92682878 0.37536889 -2.89362723 -3.39332753 +H -0.15305340 0.10336738 1.44516472 0.61253783 -0.41400127 -3.52524163 +H -1.83455463 1.41003120 0.64607233 1.47340423 -1.12869268 -0.74476150 +H 2.05394536 -1.96549369 0.91451903 -0.30539731 2.83409948 3.39856281 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.2880271821919 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.82068210 2.44892132 -1.42886602 +H 1.31293468 -0.37068168 -2.33709259 -0.88661601 0.13951789 1.16249499 +H -2.42586237 0.81292974 0.43356807 1.44948525 -0.37792611 -0.80928285 +H -0.02284843 1.82178684 -0.40915188 -1.62226603 -1.93378977 -0.25365538 +H -1.03052792 1.53057503 -0.65892981 1.88020950 -0.27675675 1.32927738 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1090.0878282320384 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.72969791 2.56621561 3.70174177 +H 1.49473687 1.14674019 -0.61813729 -1.95546110 -1.08786046 2.22615519 +H 1.26079734 0.95376462 0.84895137 -0.98253980 -0.98442750 -1.56608277 +H 0.62649024 -0.19402373 1.57157453 -0.56431472 0.90247561 -2.98896687 +H -1.37794170 0.97114248 0.67965552 2.77267272 -1.39659301 -1.37282932 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.3811712431416 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.27631247 1.81627642 0.86400983 +H -0.08223202 2.17115523 1.33573337 -0.23683419 -1.99640285 -0.13023312 +H -2.08284446 1.46174739 0.77083809 1.66323812 -0.32401776 -0.27699432 +H 0.74055096 0.55417684 -2.43010190 -0.34716130 -0.18901679 1.56727525 +H 0.77918284 0.60456070 2.04025750 -0.80290805 0.69322989 -2.02404736 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.724659327977 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.00388836 -1.52494202 1.68810121 +H -1.48059754 0.74590586 2.04322223 0.87757961 -0.50697498 -1.12580482 +H -0.85707670 -2.34590896 -0.33168407 0.38648274 1.60476761 0.18132148 +H 0.49267171 -0.42457279 1.38161455 -1.92554116 0.70325154 -3.04343777 +H -1.50043402 -0.16119206 -0.91651571 2.66523964 -0.27599879 2.29952833 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.3958573052128 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.71853007 -0.24858773 -2.54049891 +H 2.52309253 -1.15061840 -0.24859558 -1.23413881 0.60741362 0.11842764 +H -0.90313817 -1.29006627 -1.58123804 0.90920111 1.60603825 1.29142919 +H 0.33587724 2.34780041 -0.63862131 -0.30672709 -1.76091180 -0.06847108 +H 0.17116737 0.82015761 -2.87455736 -0.08689356 -0.20399502 1.19907100 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.0478311991556 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.16116813 -0.86082064 2.51566719 +H -1.61137247 -1.22852935 -0.36439640 1.63649504 1.29203957 0.73048827 +H 0.48271841 0.37532603 1.70557766 -0.67384170 -0.64364048 -2.33612029 +H 0.80340283 -0.84668123 0.81716645 -1.92226043 1.00736638 -0.92877904 +H -2.54204744 1.34508072 0.27369839 0.79835411 -0.79517211 0.01846721 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1091.6697028764936 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -3.49785629 0.88007821 -4.75616296 +H 1.55635420 -0.43950539 -0.23809450 -4.40767857 0.83854253 0.28879004 +H -0.59822175 -0.21588865 -1.54210352 1.27090920 0.07985799 2.35500402 +H -0.65189724 1.25811900 -0.79258896 2.33212479 -2.76101739 2.07711238 +H -1.43193194 -0.67816661 0.09170301 4.30236357 0.96236640 0.03553780 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1089.4377877542238 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.25004383 0.26218631 -1.93547076 +H -1.00755729 0.08003070 -0.71632135 -0.85436511 0.08915253 0.47838430 +H -0.10463047 -1.14032159 -2.02249953 0.44242020 0.94388839 1.78413916 +H 1.16274353 0.64574322 0.11770075 -3.21952550 -1.45116984 -0.75101803 +H -2.36375335 0.29483533 -1.36275463 1.38129751 0.15595085 0.42394785 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.6923804035946 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.08391381 -0.43269269 2.46077257 +H 0.94563564 -0.76521969 0.82500675 -1.65585391 -0.32893012 0.10569964 +H 1.93564971 -0.10804836 -0.98783123 -1.61271335 -0.56672641 -0.06889531 +H -1.78520620 -0.29238358 0.94511957 1.71324713 -0.51699714 -1.54711677 +H 0.37573304 -1.55281752 1.11373015 0.47143563 1.84538389 -0.95063497 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.0938501995317 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.11783422 0.57718618 -1.31093307 +H -1.95615200 0.16520068 0.32599670 3.02821169 0.22119262 -0.19583227 +H 1.49860447 0.50619814 0.61117632 -3.51605662 0.53715048 -0.46578486 +H 0.00796210 0.09741554 -2.04170726 0.02275479 0.28006165 2.90810615 +H 0.60683460 1.93440946 1.00451083 0.34713302 -1.61556059 -0.93538935 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.1706563387079 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.24912440 -1.61448176 -1.09769802 +H -2.25381339 -0.76509619 1.82230484 -0.66276333 2.74877687 -2.18376899 +H 0.14545293 -2.51549508 1.61597832 -0.10437501 1.00855526 -0.59553821 +H -2.58595389 0.48075960 0.88496555 0.80264683 -2.81769995 2.05895267 +H 1.48067438 -0.47347637 -1.25561338 -2.28456708 0.67483723 1.81788028 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.1466718292015 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.77296652 -4.64596698 1.17381453 +H 1.82061073 -1.10759250 0.66757109 -2.01066528 0.33244944 -0.90025212 +H -0.85217888 -1.52387764 1.52557443 2.16665469 -1.02287528 -0.87811491 +H -0.77267639 -1.17503284 -0.22502372 2.29343739 2.88366060 -0.36630420 +H 0.32375198 -2.27356123 1.03787431 -1.67686755 2.45265559 0.97094772 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1089.5899415918514 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 5.19566291 -1.51259506 0.25278532 +H 1.88027851 0.11421775 -1.73492290 -1.62507522 2.87334585 -2.47975657 +H 1.62235477 0.23859390 1.36481020 -2.12930271 -0.13390980 -1.58142918 +H 1.16961510 -0.75618561 -0.60604511 -2.98519866 1.46555928 1.35711936 +H 1.48549047 0.86579640 -2.41116299 1.54366326 -2.69229023 2.45131245 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1086.6289940158301 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.53611604 0.58372295 0.01925089 +H 2.01616639 0.61786113 0.64452138 -2.26315389 -0.55028780 -0.93833275 +H -1.13781146 -0.19053463 2.73267747 -0.81542676 0.53439323 -0.87092508 +H -1.65651580 0.12613505 2.18841235 0.82015091 -0.50715598 0.85981122 +H -1.41377946 0.48176323 -2.42044668 0.72228594 -0.06070789 0.93013144 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1087.6885173216872 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.22593579 2.02423659 -3.78087934 +H -0.98409838 0.39254838 -1.15118939 2.22146549 -1.32161703 0.85224189 +H 1.31699856 -1.39268394 -0.66887644 -1.66362019 2.24159364 0.75119646 +H 0.28131141 1.96935259 0.03266568 0.20815969 -2.92250691 0.01517003 +H -0.10984751 0.30691098 -2.50881681 -0.54016176 -0.02200351 2.16244271 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.4800330793507 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.27684348 -2.15631319 0.41545909 +H -1.61549853 2.09888556 0.92616157 0.02233056 -0.65884856 -2.01313457 +H 0.91454136 -1.60789553 -0.19575283 -1.74906004 2.50612222 0.13800968 +H 1.74542132 -0.10926059 2.41341314 -0.68391992 0.06876778 -0.81799118 +H -1.47589121 1.40590234 -0.92108709 0.13371182 0.24016685 2.27744100 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.897623336812 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.60477224 -0.39279789 2.11900544 +H 1.39232101 -2.06570756 0.19926578 -0.75373260 1.36995225 -0.20394822 +H -1.61270584 1.38024905 -1.13034367 1.04578485 0.64728168 1.36781258 +H 1.40692254 0.23055722 1.73952390 -1.38997087 -0.25454653 -1.81631190 +H -0.71401347 2.36011977 0.48882801 -0.50698475 -1.36968383 -1.46664377 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1083.1473492334749 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.44077624 1.86883031 2.53407269 +H -1.84211238 0.93037120 1.03739720 1.66643298 -0.79524102 -1.03326152 +H -0.01954847 -1.65240521 -1.84792317 0.15058289 1.20066457 0.12813253 +H 1.22454841 0.87073708 -2.40864205 -0.44313548 -0.65839554 0.55671093 +H 0.57293884 1.29300484 1.27250618 -0.93300902 -1.61580536 -2.18537696 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.284167473828 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -2.38681269 -0.98645610 -4.30683729 +H -2.24852672 0.64688402 -0.29898644 1.78636214 -1.21651955 0.20923904 +H -1.46399944 -0.95605243 0.02428145 1.91126176 2.34427275 -0.57194318 +H 0.31330532 0.62057975 -1.45619389 -1.04685803 -1.54701649 2.85019357 +H 0.13387544 -1.24246826 -1.76677012 -0.26416143 1.40551937 1.81956178 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1091.9699888288542 target_index=0 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.03606951 3.11596708 -1.12035459 +H -0.43708720 1.17069236 0.24772635 0.57974340 -2.01956181 0.78952546 +H 1.82220276 0.29662699 -0.03979489 -2.26802716 0.74692997 1.93380931 +H 1.39791710 1.11478525 1.23683851 0.19858901 -1.17292699 -2.87139130 +H -0.30180781 0.39842120 -1.16798169 1.45343807 -0.67042779 1.26856795 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.5054255489044 target_index=1 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.06691573 1.79251839 2.54831096 +H -0.38005796 2.73450913 -0.60477270 0.99427535 -0.96243016 0.45013712 +H -0.38369044 1.80560521 1.77077228 1.77446461 -0.29502136 -2.01961529 +H 1.40155130 -0.04586577 1.85886074 -0.97503783 0.00600661 -1.94826972 +H 0.58485121 2.02636804 0.79988268 -2.86066928 -0.54119946 0.96936083 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.7856202147138 target_index=2 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.13385237 0.10296707 -1.27779051 +H 2.65599752 -0.29528064 0.74546544 -1.83371931 -0.39091173 1.47288899 +H -2.12007776 -0.11607658 -0.79085869 2.12619373 -0.07046060 0.80918360 +H 1.27759537 -0.52157598 1.98836485 1.44420060 0.36758153 -2.09069141 +H 1.61444415 -0.04072141 -2.41510661 -0.60294659 -0.00918450 1.08643298 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1092.694531356257 target_index=3 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -3.30256240 0.78111743 -3.11741872 +H -1.47864558 2.36508111 0.49437124 0.09376355 -0.16703488 0.30128817 +H -1.32228096 1.62403113 0.74814468 -0.15052222 1.09641915 -0.06948924 +H -0.13574922 -0.00607239 -1.53611849 0.22737098 0.07486542 3.65761031 +H -1.33213767 0.37987642 0.18951331 3.13195009 -1.78559543 -0.77183986 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.8707784962112 target_index=4 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -14.86759065 5.82746294 18.44949171 +H 0.21530327 0.94007371 -2.63454441 0.25580894 0.10459715 1.17136787 +H -1.75292964 -1.78556053 -0.78100346 0.93859603 1.12813629 0.29337534 +H 0.48285430 -0.16291253 -0.63569389 15.02151392 -5.98470654 -19.66531191 +H 1.40033763 1.82991110 -0.63015415 -1.34869539 -1.07538906 -0.24900631 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1084.8110023534123 target_index=5 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 2.80574483 -1.47759616 -0.17798470 +H 1.74752162 -0.82012817 1.25768407 -2.47666611 -1.71414599 -1.07120022 +H 0.24430943 -0.79323025 2.70913089 0.56352693 0.65075164 -0.77427212 +H 1.05605403 -1.81383178 0.56947907 0.63673758 2.80534580 0.37979222 +H 1.67235948 0.48721110 -1.51318344 -1.52929593 -0.26426530 1.64352495 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1082.7666438764036 target_index=6 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 0.38944671 3.20187024 0.21432417 +H 0.39801030 2.56131166 -0.48239068 -0.11063359 -1.53658192 0.94071410 +H -0.81286357 1.87244678 1.28337602 0.73514300 -1.10320892 -1.41841397 +H -1.61870602 0.28577478 -2.34566988 0.78762130 -0.03337448 0.94256427 +H 2.05018806 1.14506179 0.29976036 -1.80170597 -0.52872240 -0.67920194 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1088.2235452261052 target_index=7 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 1.54879673 -2.87372997 -2.67847620 +H 1.10794224 -1.53557700 -0.33033451 -1.53163872 2.65332051 0.69718630 +H 0.20435546 -0.37327205 -2.39678978 -0.31615636 0.38909550 1.97932609 +H 0.60328897 2.43315121 -0.29306053 -1.82512359 -1.26276189 0.35088323 +H -0.12343839 1.92693038 -0.17273134 2.12420884 1.09428925 -0.34890657 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.9557300780891 target_index=8 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -0.91314415 -1.25990436 -4.63320196 +H 1.02825928 0.77323247 -2.44639972 -1.21066977 2.40913554 1.77009013 +H 1.56325930 -1.62119499 -1.92483084 -0.54377622 0.82482826 0.64110794 +H -0.75999092 -0.46496107 -1.39139580 1.54046841 1.04672588 3.29930687 +H 0.47366850 2.05090789 -1.82849722 1.12682194 -3.02104859 -1.07713278 +5 +Properties=species:S:1:pos:R:3:forces:R:3 energy=-1085.1534662912027 target_index=9 pbc="F F F" +C 0.00000000 0.00000000 0.00000000 -1.42547577 -1.32908352 -0.66896483 +H -1.51912669 0.22312718 -0.58310733 -2.05564315 1.12186177 -0.11143423 +H 0.60631215 -2.42809563 1.25333518 -0.35950929 1.22883514 -0.60695957 +H -1.68594996 -0.50781708 -2.00258197 1.24584659 0.01193404 0.89886167 +H -2.51211295 0.70746498 -0.46014712 2.59497239 -1.03370683 0.48836275 diff --git a/tests/test_cpp_extension.py b/tests/test_cpp_extension.py index 727ab4d..d58e348 100644 --- a/tests/test_cpp_extension.py +++ b/tests/test_cpp_extension.py @@ -13,7 +13,7 @@ def prepare_test(stucture_path, r_cut, n_gnn, n_trans, structure_index, hypers_p device = 'cpu' structure = ase.io.read(stucture_path, index=structure_index) hypers = load_hypers_from_file(hypers_path) - + MLIP_SETTINGS = hypers.MLIP_SETTINGS ARCHITECTURAL_HYPERS = hypers.ARCHITECTURAL_HYPERS @@ -46,6 +46,8 @@ def get_predictions_old_python(model, structure, all_species, ARCHITECTURAL_HYPE ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) if ARCHITECTURAL_HYPERS.USE_LONG_RANGE: raise NotImplementedError( @@ -73,6 +75,8 @@ def get_predictions_cpp(model, structure, all_species, ARCHITECTURAL_HYPERS): ARCHITECTURAL_HYPERS.USE_ADDITIONAL_SCALAR_ATTRIBUTES, ARCHITECTURAL_HYPERS.USE_LONG_RANGE, ARCHITECTURAL_HYPERS.K_CUT, + ARCHITECTURAL_HYPERS.N_TARGETS > 1, + ARCHITECTURAL_HYPERS.TARGET_INDEX_KEY ) if ARCHITECTURAL_HYPERS.USE_LONG_RANGE: raise NotImplementedError( diff --git a/tests/test_pet_runs_without_errors.py b/tests/test_pet_runs_without_errors.py index 1197a9a..a34e33d 100644 --- a/tests/test_pet_runs_without_errors.py +++ b/tests/test_pet_runs_without_errors.py @@ -85,6 +85,29 @@ def test_pet_train(hypers_path): assert process.returncode == 0, "pet_train script failed" +def test_pet_train_multi_target(): + """ + Test the 'pet_train' script for successful execution with multi-target settings. + + This test runs the 'pet_train' script with the multi-target configuration and asserts + that it completes successfully (return code 0). + """ + clean() + + script = "pet_train" + args = [ + "methane_multi_target_10.xyz", + "methane_multi_target_10.xyz", + "hypers_minimal_multi_target.yaml", + "../default_hypers/default_hypers.yaml", + "test", + ] + + process = subprocess.run( + [script] + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + assert process.returncode == 0, "pet_train script failed for multi-target configuration" + def test_pet_run(prepare_model): """ Test the 'pet_run' script using the model prepared by 'prepare_model'. @@ -119,13 +142,13 @@ def test_single_struct_calculator(prepare_model): """ model_folder = prepare_model single_struct_calculator = SingleStructCalculator( - model_folder, + model_folder, quadrature_order=2 ) structure = ase.io.read("../example/methane_test.xyz", index=0) energy, forces = single_struct_calculator.forward(structure) assert forces.shape == (5, 3), "single_struct_calculator failed" - energy, forces = single_struct_calculator.forward(structure, quadrature_order = 2) + energy, forces = single_struct_calculator.forward(structure) assert forces.shape == (5, 3), "single_struct_calculator failed"