Working on Script Documentation

Hello, How should I start working with the changes in script documentation? Will these above mentioned changes work or are there any other changes or additions which can be done?

Also, Are there any other specific important issues on which I can start working? Or should I start working on any of the issues mentioned on github?

Thanks!

Sorry, I’ve been pretty busy. The script documentation is here: https://github.com/Avogadro/two.avogadro.cc/tree/main/source/scripts

Thanks for the offer - I’ll think a bit about some possible additional scripts / issues.

One thought about additional scripts. There’s a new package to generate peptides. It might be nice to have a simple script:

  • popup for format (biln, helm, fasta)
  • line edit for the sequence
  • popup for secondary structure (Automatic, B (beta bridge), H (alpha helix). E (beta strand), S (bend),T (turn) and G (3/10 helix) …)
  • generate the PDB file and read it into Avogadro

Oh … an easier idea. Your current script works on all the atoms and doesn’t check if there are selected atoms.

If you noticed, I tweaked the script to check for selected atoms: https://github.com/OpenChemistry/avogadro-commands/blob/fd48312fbdc8fedf5cd13d33e2282129caf66671/replace.py#L168

Then the loop either works on all atoms or only selected atoms:

Right now, “flatten” and “scale” need that tweak to work on selected atoms too.

And it would be great to have some docs that:

Okay, I understood what needs to be done… so I am planning to go with this order

  1. To Add selection tweaks on flatten and scale
  2. To Add Peptide generation script
  3. To Prepare doc which goes through any one example and also adding support for selections

Does this order work?
Thanks and sry for late reply

Oh, I think I’d suggest 1 then 3 next. My hope is that we can get others to start working on scripts. (One of my students is doing this now.) So the documentation will be helpful.

Peptide generation would be nice, but is less important.

Thanks! (No need to apologize for a “late” reply. … you only posted a few hours ago. Hardly late!)

Hello, Can you please have a look at the script example documentation.
Please do let me know the feedback on this…I’ll make the required changes and submit a pr if everything is apt.
I think I should elaborate more on the selection support module in the doc. What is your opinion? Is it sufficient? :thinking:
I have included doc for selection support in the same documentation. Should I make a separate doc for selection support or it works?
Thank you very much!

It looks good - I’d like to see a pull request. For now, I think the selection part is fine. The key thing is to get feedback from others, especially new contributors.

As far as selection, I think it might work better in a separate document (e.g. “adding selection to a command”). Right now, it’s somewhat long for one page. So let’s split it.

That way, your script can also be a tutorial for how to make other commands.

Yes, even I felt that the doc is too long. So, how should I split it? … Should I divide the example.md file into two parts ie example 1.md abd example2.md?
And from which part should we split it?

Should we split it at ‘providing Input to runcommand function’ segment?

Yes, for now that seems like the best place for a split. As far as file names, I guess example1.md and example2.md indicates it’s in two parts.

So the file names are fine right or should I give some different file names?

Also I am sending the pr very soon. So, are there any issues which I can solve? or should I pick any issue available on github and try to find solutions for the same?

The filenames are fine. If we decide to change the names later, it’s easy. Better to have something that works.

If you’d like to pick a new issue, that sounds great. Otherwise, I’d love to see a script for that peptide package PyPept as I mentioned. Let me know if you need help / feedback.

Yes, yes I’ll be happy to do the needful :+1:.
So, here is the pr for the script documentation.

You can see your pages live now: Command Scripts — Avogadro 1.97.0 documentation

(They needed to be added to the toctree, which I did when adding the energy script docs.)