@@ -775,26 +775,21 @@ def init_LJ_datasets(meGO_ensemble, matrices, pairs14, exclusion_bonds14, args):
775775 OO_mask = masking .create_linearized_mask (
776776 type_ai_mapped .to_numpy (),
777777 type_aj_mapped .to_numpy (),
778- [("O" , "O" ), ("OM" , "OM" ), ( " O" , "OM" )],
778+ [("O" , "O" ), ("O" , "OM" )],
779779 symmetrize = True ,
780780 )
781-
782- # hydrongen-oxygen attraction
783- HO_mask = masking .create_linearized_mask (
781+ OMOM_mask = masking .create_linearized_mask (
784782 type_ai_mapped .to_numpy (),
785783 type_aj_mapped .to_numpy (),
786- [("H" , "O" ), ( "H" , " OM"), ( "H" , "OA " )],
784+ [("OM" , "OM " )],
787785 symmetrize = True ,
788786 )
789787
790- # oxygen-nitrogen repulsion (when not attractive)
791- ON_mask = masking .create_linearized_mask (
788+ # hydrongen-oxygen attraction
789+ HO_mask = masking .create_linearized_mask (
792790 type_ai_mapped .to_numpy (),
793791 type_aj_mapped .to_numpy (),
794- [
795- ("O" , "N" ),
796- ("OM" , "N" ),
797- ],
792+ [("H" , "O" ), ("H" , "OM" ), ("H" , "OA" )],
798793 symmetrize = True ,
799794 )
800795
@@ -805,11 +800,11 @@ def init_LJ_datasets(meGO_ensemble, matrices, pairs14, exclusion_bonds14, args):
805800
806801 # TODO
807802 # here we should iterate over the pairs in type definition amd generate the repulsions
808- # NL-NZ repulsion
803+ # NL-NL repulsion
809804 NN_mask = masking .create_linearized_mask (
810805 type_ai_mapped .to_numpy (),
811806 type_aj_mapped .to_numpy (),
812- [("NL" , "NL" ), ( "NZ" , "NZ" ), ( "NL" , "NZ" ) ],
807+ [("NL" , "NL" )],
813808 symmetrize = True ,
814809 )
815810
@@ -822,8 +817,8 @@ def init_LJ_datasets(meGO_ensemble, matrices, pairs14, exclusion_bonds14, args):
822817 train_dataset .loc [OO_mask & ((train_dataset ["bond_distance" ] != 3 ) | (~ train_dataset ["same_chain" ])), "rep" ] = (
823818 type_definitions .mg_OO_c12_rep
824819 )
825- train_dataset .loc [ON_mask & ((train_dataset ["bond_distance" ] != 3 ) | (~ train_dataset ["same_chain" ])), "rep" ] = (
826- type_definitions .mg_ON_c12_rep
820+ train_dataset .loc [OMOM_mask & ((train_dataset ["bond_distance" ] != 3 ) | (~ train_dataset ["same_chain" ])), "rep" ] = (
821+ type_definitions .mg_OMOM_c12_rep
827822 )
828823 train_dataset .loc [HH_mask & ((train_dataset ["bond_distance" ] != 3 ) | (~ train_dataset ["same_chain" ])), "rep" ] = (
829824 type_definitions .mg_HH_c12_rep
@@ -844,6 +839,7 @@ def init_LJ_datasets(meGO_ensemble, matrices, pairs14, exclusion_bonds14, args):
844839 train_dataset ["mg_sigma" ] = pd .Series (pairwise_mg_sigma )
845840 # special mg sigma cases:
846841 train_dataset .loc [OO_mask , "mg_sigma" ] = (type_definitions .mg_OO_c12_rep ) ** (1 / 12 ) / 2 ** (1 / 6 )
842+ train_dataset .loc [OMOM_mask , "mg_sigma" ] = (type_definitions .mg_OMOM_c12_rep ) ** (1 / 12 ) / 2 ** (1 / 6 )
847843 train_dataset .loc [HH_mask , "mg_sigma" ] = type_definitions .mg_HH_c12_rep ** (1 / 12 ) / 2 ** (1 / 6 )
848844 train_dataset .loc [NN_mask , "mg_sigma" ] = (type_definitions .mg_NN_c12_rep ) ** (1 / 12 ) / 2 ** (1 / 6 )
849845 train_dataset .loc [HO_mask , "mg_sigma" ] = type_definitions .mg_HO_sigma
@@ -1074,6 +1070,7 @@ def set_sig_epsilon(meGO_LJ, parameters):
10741070 (meGO_LJ ["probability" ] <= meGO_LJ ["limit_rc_att" ] * np .maximum (meGO_LJ ["rc_probability" ], meGO_LJ ["rc_threshold" ]))
10751071 & (meGO_LJ ["probability" ] > meGO_LJ ["md_threshold" ])
10761072 & (meGO_LJ ["rc_probability" ] > meGO_LJ ["md_threshold" ])
1073+ & (meGO_LJ ["epsilon_prior" ] < 0.0 )
10771074 )
10781075 meGO_LJ .loc [condition , "epsilon" ] = (- meGO_LJ ["rep" ] * (meGO_LJ ["distance" ] / meGO_LJ ["rc_distance" ]) ** 12 ).clip (
10791076 lower = - 20 * meGO_LJ ["rep" ], upper = - 0.05 * meGO_LJ ["rep" ]
@@ -1612,12 +1609,8 @@ def make_pairs_exclusion_topology(meGO_ensemble, meGO_LJ_14, args):
16121609 ] = type_definitions .mg_OO_c12_rep
16131610
16141611 df .loc [
1615- (
1616- (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" )
1617- )
1618- & (
1619- (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" )
1620- ),
1612+ ((df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" ))
1613+ & ((df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" )),
16211614 "c12" ,
16221615 ] = type_definitions .mg_OMOM_c12_rep
16231616
@@ -1628,29 +1621,19 @@ def make_pairs_exclusion_topology(meGO_ensemble, meGO_LJ_14, args):
16281621 ] = type_definitions .mg_HH_c12_rep
16291622
16301623 df .loc [
1631- (
1632- (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "NL" )
1633- )
1634- & (
1635- (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "NL" )
1636- ),
1624+ ((df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "NL" ))
1625+ & ((df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "NL" )),
16371626 "c12" ,
16381627 ] = type_definitions .mg_NN_c12_rep
16391628
16401629 df .loc [
16411630 (
1642- (
1643- (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" )
1644- | (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "O" )
1645- )
1646- & ((df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "N" ))
1631+ (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "O" )
1632+ & (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "N" )
16471633 )
16481634 | (
1649- ((df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "N" ))
1650- & (
1651- (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "OM" )
1652- | (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "O" )
1653- )
1635+ (df ["ai" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "N" )
1636+ & (df ["aj" ].map (meGO_ensemble ["sbtype_type_dict" ]) == "O" )
16541637 ),
16551638 "c12" ,
16561639 ] = type_definitions .mg_ON_c12_rep
0 commit comments