Skip to content

Increasing pyMBE interoperability (part I)#151

Open
jorch28 wants to merge 60 commits into
pyMBE-dev:mainfrom
jorch28:CheckThisFeature
Open

Increasing pyMBE interoperability (part I)#151
jorch28 wants to merge 60 commits into
pyMBE-dev:mainfrom
jorch28:CheckThisFeature

Conversation

@jorch28

@jorch28 jorch28 commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Application of the strategy pattern to delegate the responsability of executing the simulation engine to a particular engine class (e.g EspressoEngine).

Added

  • EspressoEngine Class
  • EspressoSystemProtocol Class to check that an the working engine corresponds to espresso.system instance
  • reaction methods to EspressoEngine
  • handy functions to EspressoEngine
  • miscellaneous methods as (calculate_net_charge, change_volume_and_re-scale_particles,enable_motion_of_rigid_object,etc.)
  • method add_instances_to_engine to add particles, bonds and angles to Espresso

Modified

  • create_particle,create_residue, create_molecule,etc. to avoid an explicit dependence to Espresso
  • unit_tests and functional_tests accordingly so that they introduce the particles, bonds and angles before choosing espresso as the working engine. Execute pmb methods from the simulation_engine when they depend on espresso.

jsd94 and others added 30 commits April 8, 2026 21:21
…le_position,inst._particle_fix to _get_instances_df method
- create_espresso_bond_instance
-_create_hydrogel_chain
- create_hydrogel
-_get_espresso_bond_instance
- create_added_salt
- create_counterions
- create_bond
-create_particle
-create_residue
-create_molecule
-create_protein
add methods to enable the decoupling:
-set_simulation_engine
-add_instances_to_engine
- algorithm to add instances to espresso system
…type in config class in order to be able to set the position as NDarrays
_create_hydrogel_chain
_delete_particles_from_engine
calculate_net_charge
center_object_simulation_box
create_counterions
create_hydrogel
create_particle
delete_instances_in_system

Add methods:
change_volume_and_rescale_particles
update_instances_ids_according_to_engine_particle_ids
…t the missing particles from pymbe DB and the particles that have not been transferred yet to espresso.

Add methods _add_bond, _add_particle,_check_particle_exists_in_espresso,_get_last_particle_id_in_espresso,update_instances_ids_according_to_engine_particles_ids
…ase_csv and _save_database_csv

Add added_to_engine for pmb_type bond in _load_database_csv and _save_database_csv.
This methods still have to pass the test due float point accuracy between save/load
…e, particle_id,position and added_to_engine.

Add pymbe type bond and allowed particle_id1,particle_id2 and added_to_engine
The main modification consists on setting as the simulation engine espresso and adding to the simulation engine the instances (particles and bonds ) to the engine. Also removing espresso as an argument from pymbe methods. Adding box_l as argument to pymbe methods
-reaction_montecarlomethods
-determine_reservoir_concentrations
Migrate methods the following methods to the manager:
-propose_unused_types
-get_lj_parameters
-get_radius_map
-_get_label_id_map
- handy functions
- reaction methods
- calculate_center_of_mass
-determine_reservoir_concentrations
-get_label_id_map
-get_lj_parameters
-get_radius_map
-propose_unused_type
jsd94 and others added 29 commits May 9, 2026 21:09
…ins a numpy array that contains arrays. Thus, the approach that has worked is to loop through the array and compare them element by element
migrate create_angle_instance to simulation engine
Modify add_instances_to_engine to account for added angles.
…ain mpc monomer + 2 nodes

Fix backbone vector so that accounts for the number of monomers in the chain
…itude instead of reduced length, because now the backbone vector in the polymeric chain between nodes is not normalized
@pm-blanco pm-blanco requested a review from jngrad June 24, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant