noid-group / BOCS

Bottom-up Open-source Coarse-graining Software
15 stars 5 forks source link

Using generalized-Yvon-Born-Green (g-YBG) method for composite system nonbonded parametrization #18

Closed yel21 closed 1 year ago

yel21 commented 1 year ago

Dear BOCS's users,

I would like to ask questions about using the generalized-Yvon-Born-Green (g-YBG) method to parameterize interactions in composite systems (structurally correlated).
I tried parameterising the nonbonded interaction in composite systems with stacks containing polymer (C-type beads) and graphene-like molecules (A-type beads). To understand in what range, I should conduct force calculations; first I calculated the target distribution A-A, A-C, C-C, please see fig.SYS_all_targets.jpg. From these distributions, I understand that I should calculate the forces in the range from 0 to 4 ns. Thus, I cannot use the Invert Bolzman Procedure or standard force-matching methods for parametrizing nonbonded interations.

How do you think is it possible to use the g-YBG method implemented in the BOCS package to parameterize bonded and nonbonded interactions? Also, is it possible to use may be a hybrid scheme to parameterize this system by only non-bonded will be calculated using the g-YBG method and bonded interactions will be calculated by, for example, the Invert Bolzman Procedure or force-matching?

Sincerely yours, Victor SYS_all_targets

rszukalo commented 1 year ago

Hi Victor,

Thanks for reaching out and apologies for the late response. I think I understand your questions/comments and will do my best to answer them.

First, the g-YBG method is actually equivalent to the multiscale force matching method implemented in BOCS. When you parameterize a CG model with BOCS, there are two sets of output files. One is f_forces. and the other is f_struct.: The first set (f_forces) comes from force matching while the second set (f_struct) comes from the g-YBG method. If you compare the two outputs, you will notice they are they same. The advantage of have the g-YBG method is you can decompose the resulting forces/potential into a pair contribution and a many-body contribution.

Regarding your second question, BOCS has the capability to use force-matching/g-YBG to parameterize whatever set of interactions you'd like. For example, you can tell BOCS to only parameterize nonbonded interactions, and then use another method (IBI, IMC, etc.) to parameterize the bonded interactions. Furthermore, BOCS handles intramolecular interactions quite well and usually, there is no problem of having BOCS simply parameterize all interactions (both bonded and nonbonded).

From what I can tell from your figures, despite your system being very structurally correlated, it might be worth trying to simply use the force-matching/g-YBG method in BOCS to parameterize your system and see how the results are. If your simulation box is large enough, you would just need to make sure that you parametrize your force functions out to a rmax of ~ 4nm.

If you would like to discuss further, please reach out as I'd be happy to help you get this system and your ideas input into BOCS to see how the software handles your system.

Thanks, Ryan

yel21 commented 1 year ago

Dear Ryan,

Thank you very much for your detailed answer.

First, the g-YBG method is actually equivalent to the multiscale force matching method implemented in BOCS. When you parameterize a CG model with BOCS, there are two sets of output files. One is f_forces. and the other is f_struct.: The first set (f_forces) comes from force matching while the second set (f_struct) comes from the g-YBG method. If you compare the two outputs, you will notice they are they same. The advantage of have the g-YBG method is you can decompose the resulting forces/potential into a pair contribution and a many-body contribution.

Thank you for your explanation. I try to build BOCS under my Ubuntu machines to try build input files for BOCS and run force-matching. I used Ubuntu 22.10 and 21.04 and in both I got two similar errors. When try to install force-matching:

3%] Building C object src/CMakeFiles/cgmap.dir/cgmap.c.o In file included from /usr/include/rpc/xdr.h:46, from /home/victor/git/BOCS/force-matching/src/gromacs_topology.h:11, from /home/victor/git/BOCS/force-matching/src/transf_map.h:15, from /home/victor/git/BOCS/force-matching/src/cgmap.c:22: /usr/include/rpc/types.h:98:10: fatal error: netconfig.h: Нет такого файла или каталога 98 | #include <netconfig.h> | ^~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/cgmap.dir/build.make:76: src/CMakeFiles/cgmap.dir/cgmap.c.o] Ошибка 1 make[1]: *** [CMakeFiles/Makefile2:104: src/CMakeFiles/cgmap.dir/all] Ошибка 2 make: *** [Makefile:91: all] Ошибка 2 However, in my include/rpc folder I did not find netconfig.h file. Maybe you could help me, how can I install netconfig.h file in Ubuntu?

When I did pressure-matching installation I got such error:

[ 6%] Linking C executable p_match /usr/bin/ld: CMakeFiles/p_match.dir/distro.c.o: в функции «get_variance»: distro.c:(.text+0x4df): неопределённая ссылка на «pow» /usr/bin/ld: CMakeFiles/p_match.dir/distro.c.o: в функции «get_bin_index»: distro.c:(.text+0x675): неопределённая ссылка на «floor» /usr/bin/ld: CMakeFiles/p_match.dir/basis.c.o: в функции «get_pres_basis_force»: basis.c:(.text+0x136): неопределённая ссылка на «pow» /usr/bin/ld: CMakeFiles/p_match.dir/basis.c.o: в функции «get_pres_basis_potential»: basis.c:(.text+0x1ff): неопределённая ссылка на «pow» /usr/bin/ld: CMakeFiles/p_match.dir/solv_lin_eqns.c.o: в функции «solv_pres_lin_eqns»: solv_lin_eqns.c:(.text+0x58c): неопределённая ссылка на «dgesv_» /usr/bin/ld: CMakeFiles/p_match.dir/solv_lin_eqns.c.o: в функции «solv_pres_lin_eqns_error»: solv_lin_eqns.c:(.text+0xde1): неопределённая ссылка на «dgesvx_» /usr/bin/ld: CMakeFiles/p_match.dir/solv_lin_eqns.c.o: в функции «solv_pres_lin_eqns_weighted»: solv_lin_eqns.c:(.text+0x15f7): неопределённая ссылка на «dgesv_» /usr/bin/ld: CMakeFiles/p_match.dir/solv_lin_eqns.c.o: в функции «get_best_fit»: solv_lin_eqns.c:(.text+0x1893): неопределённая ссылка на «dgelss_» collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/p_match.dir/build.make:193: p_match] Ошибка 1 make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/p_match.dir/all] Ошибка 2 make: *** [Makefile:91: all] Ошибка 2 Maybe you could help me with solving this error also?

Regarding your second question, BOCS has the capability to use force-matching/g-YBG to parameterize whatever set of interactions you'd like. For example, you can tell BOCS to only parameterize nonbonded interactions, and then use another method (IBI, IMC, etc.) to parameterize the bonded interactions. Furthermore, BOCS handles intramolecular interactions quite well and usually, there is no problem of having BOCS simply parameterize all interactions (both bonded and nonbonded).

I calculated using IBI/BI procedure all bonded interactions for my model. As I understand for such structural ordered systems simple force-matching could not work well for calculating non-bonded potentials and generalized-Yvon-Born-Green (g-YBG) method may be preferable. My idea was to calculate all bonded and non-bonded intecations using BOCS to have all tabulated potentials obtained by one package or if this would not possible calculate only non-bonded interactions with BOCS and see how the systems will be simulated using two table sets calculated with and partly without help BOCS.

Best regards, Victor