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

Add optional add_bond argument to Pattern.apply_to_compound() #387

Open
summeraz opened this issue Sep 19, 2017 · 2 comments
Open

Add optional add_bond argument to Pattern.apply_to_compound() #387

summeraz opened this issue Sep 19, 2017 · 2 comments

Comments

@summeraz
Copy link
Contributor

The Pattern.apply_to_compound() method attaches copies of one Compound to another Compound and adds bonds between them. I think it would be useful to have the addition of bonds be optional (although this could still be the default behavior). For example, the use-case where I'm running into problems is in trying to construct a tethered nanoparticle, where I want to add tethers at locations designated by Ports on the nanoparticle, but do not want to add a bond between them. Currently, if I create a Pattern for how my tethers should be arranged and use apply_to_compound to place the tethers in this arrangement on the nanoparticle, I end up with bonds that I do not want. There are several work-arounds to solve this problem, but I think adding an optional add_bond argument to Pattern.apply_to_compound() would be a nice addition.

@ctk3b
Copy link
Member

ctk3b commented Sep 19, 2017

Should be easy enough to pass that arg through to force_overlap. Slightly less pretty question is do you allow users to independently control backfill and guest bonding?

@summeraz
Copy link
Contributor Author

Yes, just passing add_bond to force_overlap was what I had in mind. Not sure what the best approach is concerning controlling bonding of guest vs. backfill. Adding two arguments (e.g. add_bonds_guest and add_bonds_backfill) seems sloppy... Maybe just having one add_bonds argument and having the options be True(default), False, guest-only, and backfill-only?

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

No branches or pull requests

2 participants