Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

PR

Just a small problem.

I can fix it online!

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

sponge.colvar.CombineCV

View Source On Gitee
class sponge.colvar.CombineCV(colvar: Union[List[Colvar], Tuple[Colvar]], weights: Union[float, List[float], Tuple[float], Tensor] = 1, offsets: Union[float, List[float], Tuple[float], Tensor] = 0, exponents: Union[float, List[float], Tuple[float], Tensor] = 1, normal: bool = False, periodic_min: Union[float, ndarray, Tensor] = None, periodic_max: Union[float, ndarray, Tensor] = None, periodic_mask: Union[Tensor, ndarray] = None, use_pbc: bool = None, name: str = 'combine')[source]

Polynomial combination of a set of Colvar si with shape (S_1, S_2, …, S_n). {S_i} means dimensions of collective variables.

S=inwi(sioi)pi
Parameters
  • colvar (Union[List[Colvar], Tuple[Colvar]]) – Array of Colvar to be combined si.

  • weights (Union[List[float], Tuple[Float], float, Tensor]) – Weights wi for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 1

  • offsets (Union[List[float], Tuple[Float], float, Tensor]) – Offsets oi for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 0

  • exponents (Union[List[float], Tuple[Float], float, Tensor]) – Exponents pi for each Colvar. If a list or tuple is given, the number of the elements should be equal to the number of CVs. If a float or Tensor is given, the value will be used for all Colvar. Default: 1

  • normal (bool) – Whether to normalize all weights to 1. Default: False.

  • periodic_min (Union[float, ndarray, Tensor]) – The periodic minimum of the output of the combination of the CVs. If the output is not periodic, it should be None. Default: None.

  • periodic_max (Union[float, ndarray, Tensor]) – The periodic maximum of the output of the combination of the CVs. If the output is not periodic, it should be None. Default: None.

  • periodic_mask (Union[Tensor, ndarray]) – Mask for the periodicity of the outputs. The shape of the tensor should be as the same as the outputs, i.e. (S_1, S_2, …, S_n). Default: None.

  • use_pbc (bool) – Whether to use periodic boundary condition. If None is given, it will determine whether to use periodic boundary conditions based on whether the pbc_box is provided. Default: None.

  • name (str) – Name of the collective variables. Default: 'combine'

Supported Platforms:

Ascend GPU

set_pbc(use_pbc: bool)[source]

set whether to use periodic boundary condition