openmopac/mopac

Optimize a chain or multiple residues

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
Some times I wish to optimize the geometry of specific atoms and not the whole structure.
If the atoms belong to the same residue I can use the OPT("residue") keyword to do that.
If the atoms I wish to optimize are spread among different residues or different chains, this is not possible. I can use OPT("residue"=A.AA) to optimize a sphere around the residue, which however is problematic if I do not wish to change the geometry of certain neighboring atoms or if I wish to simultaneously optimize the geometry of two areas which are distant in space.

It is not possible to specify multiple residues, for example NOOPT OPT("A2") OPT("A3") will only optimize the geometry of residue A2.

Describe the solution you'd like
An option to optimize a full chain, maybe OPT("B*") and a way to specify several residues to be optimized.
It would be nice to be able to choose atom by atom (specially if working with protein-ligand systems).

Describe alternatives you've considered
Manually edit the input file to set all interested atoms inside the same residue? Probably it would fail for residues which are distant in space however.

Multiple residues can be specified as a comma-separated list using one instance of the OPT keyword, as described in its manual entry (e.g. OPT("A2","A3") instead of OPT("A2") OPT("A3")). Also, OPT is only a convenience keyword for specifying which atomic coordinates to optimize. The more fine-grained way to do this is to use one of the extended (non-PDB) input-file formats for specifying geometry,

element_symbol x_coordinate x_opt y_coordinate y_opt z_coordinate z_opt

instead of

element_symbol x_coordinate y_coordinate z_coordinate

where the ?_opt flags are either 0 for frozen coordinates or 1 for relaxed coordinates. There are various ways of switching back and forth between PDB files and standard input files that retain PDB information as atom labels, if you want to use the more fine-grained optimization.

Thank you Jonathan, sorry while reading the documentation I was not able to grasp all these different ways to set the input.
This input file format is exactly what I was searching for, I must have missed it while reading the documentation; I'm sorry for troubling you.