maml
maml copied to clipboard
ValueError: could not convert string to float: ' command mindist does not exist.\n'
Hi developers,
I am trying to reproduce some of the results in the paper of Performance and Cost Assessment of Machine Learning Interatomic Poentials 2020. I have problems running the MTP, I followed your jupyter notebook but encounter the following error:
Thanks for the help in advance!
@wilsonnieto Hi! From my inspection, your mlp
executable might haven't been added to a location where the whole system can find it, or it can also be the case that your mlp
executable is not fully installed. You may test it out in your terminal with the commands of mlp help mindist
, which should give you some documentation about this command.
To make sure mlp
is fully installed, you can follow the documentation of MLIP package on tests after compilation. To make sure mlp
executable can be found in the whole system, you may refer to this issue.
Please let me know if the problem is sloved. Thanks!
I manage to make it run, but now I found an error with the JSON decoder. I did not install the mlip2 interface with lammps, maybe it has something to do with this?
This is the error:
@wilsonnieto Hi! First, this is not related to the lammps interface, as MTP training only uses the mlp
executable.
I am not able to reproduce this bug, as my notebook can run without problem. I suspect that your mlp train did not successfully train an MTP. Here are a few questions that can lead to the solution:
- By "I manage to make it run", I wonder if you have changed any of the source codes in maml. It's better to keep them unchanged unless there are very good reasons.
- Have you checked if your
mlp
executable can past all tests in the MLIP package? You can find where to make the test from the MLIP installation guideline. - Make sure that you have updated maml to the latest version. This can be done by
git clone https://github.com/materialsvirtuallab/maml; cd maml; pip install -e .
, which is the protocol way to update an open-source package on github.
Please try and let me know if any one of the above can solve the error or not.
Hi thanks for the answer.
- No I did not change the code, by manage to make it run I meant to correctly install the mlip-2 software.
- The executable passes all the test.
- I did update the code but I still get the same error.
I do not know if it has something to do with my python version installed.
Hi @wilsonnieto, have you been able to find out the source of bug? If yes, please kindly let me know. Otherwise, I would like to reproduce the error you got when running our notebook. Could you add one line of code shutil.copyfile(os.path.join(os.getcwd(), save_fitted_mtp), os.path.join(os.getcwd(), "../fitted_1.mtp"))
in the line 654 shown below?
https://github.com/materialsvirtuallab/maml/blob/0ddbe108ca455d958b8adcbf7a60eaa8ec0bfc2a/maml/apps/pes/_mtp.py#L654-L655
With this, the trained MTP file should be transferred to the folder where the notebook is executed, and it should have a name as fitted_1.mtp
. If you can successfully get this fitted_1.mtp file, you may self check or send us the file, and we will check why it cannot be correctly processed.
As our load_config() method runs okay to load MTP config files written by the MLIP package, and the MTP config file only has one version of formatting, I suspect that the MTP potential was not successfully trained. We can verify this or find other error by the above suggested way.
Hi thanks for trying to help! I get the fitted_1.mtp, but when I use the mtp.from_config(fitted_1.mtp) I get exactly the same error with the decoder as I mentioned before. I will send you the file by email to see if you can find an error.
Thanks!
Wilson
Can you please share me your email? I can not send the mtp file in this comment section.
Hi @wilsonnieto, my email is [email protected]
Hi @JiQi535 . I am getting the same error of "command mindist does not exist". I have installed mlip package through conda. While running the self-test I am also getting this error :
Note: self-test is running without #define MLIP_DEBUG; build with -DMLIP_DEBUG and run if troubles encountered Serial tests: Test 1 ... (Testing Configuration::features) ERROR: MLIP Exception caught: ERROR: Input stream is not open Thrown by function Load, source file: ../src/configuration.cpp, line: 313
Your help is really appreciated!
Hi @mind-dime , you can refer to the MLIP documentation on Gitlab for correct installation of their executables. I don't think they are supporting installation with conda. After correct installation, run "mlp list" in your terminal will show the list of available commands, and "mindist" is just one of their supported commands.
Please report to the MLIP developers if the package cannot be successfully installed, which should not be the case from my own testing.
Hi @JiQi535 , so how can I use the MTP with MAML? can it be done without installing MLIP? Sorry I am a bit confused!
@mind-dime MLIP installation is needed to train or use MTP with MAML. MAML serves as a python interface here for convenient training and some high-throughput calculators.
@JiQi535 thanks for your clarification. One final thing, cant the parameters "min_dist" and "radial_basis_size " be supplied to untrained mtp via maml? I guess not?
@mind-dime The radia_basis_size
is among one of the arguments supported by the train() function of MTPotential in maml. You can check out our documentation for that function. The min_dist
is not supported as a direct input, but we deal with it using the "mlp mindist" command by MLIP to find the shortest bond length in the training set. This usage is the purpose of the "mlp mindist" command I believe.