Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize define_AA_particles_in_sequence #42

Closed
pm-blanco opened this issue Apr 24, 2024 · 1 comment
Closed

Generalize define_AA_particles_in_sequence #42

pm-blanco opened this issue Apr 24, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@pm-blanco
Copy link
Collaborator

Currently define_AA_particles_in_sequence is highly specific for proteins and peptides. We could generalize this function so:

  • It takes a list of particle names
  • It takes a dictionary with the parameters to define such particles
  • A prototype of how it could look like:
# Just an example of a possible setup
kT = pmb.Quantity(1, "reduced_energy")
particle_names=["A","B"]
particle_parameters={"sigma": {"A": 0.2*pmb.units.nm,
                                                        "B": 0.3*pmb.units.nm}
                                        "epsilon:{"A": kT,
                                                        "B": kT}
                                                   "q":{"A": 0,
                                                        "B": 1}

def define_list_of_particle(particle_names, particle_parameters):
          for particle_name in particle_names:
                 parameter_values={}
                 for parameter_name in particle_parameters.keys():
                      if particle_name in particle_parameters[particle_name]:
                          parameter_values[particle_name]=particle_parameters[particle_name]
                      else:
                         parameter_values[particle_name]=None
                 self.define_particle(**parameter_values)
@pm-blanco pm-blanco added the good first issue Good for newcomers label Apr 24, 2024
@pm-blanco
Copy link
Collaborator Author

solved in #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant